al_replace_path_component(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

al_replace_path_component β€” Allegro 5 API. Also known as al_replace_path_component(3alleg5), iykyk.


✨ SYNOPSIS ✨

okay so first you gotta pull in the header, bestie:

#include <allegro5/allegro.h>

void al_replace_path_component(ALLEGRO_PATH *path, int i, const char *s)

πŸ’… DESCRIPTION πŸ’…

okay so picture this: you got an ALLEGRO_PATH *path, an index int i, and a string const char *s. al_replace_path_component replaces the i’th directory component with that new string s. That's the whole serve. No cap.

If i is negative, it counts from the right. So -1 refers to the last path component. Iconic behavior, honestly.

⚠️ But if you pass an index that is out of bounds? That's an error. Not cute. Do not. fr fr.

🌸 SEE ALSO 🌸

Other path-component besties you might wanna stalk:


That's the whole page, bestie. Coming to you from the Allegro reference manual, for al_replace_path_component(3alleg5). Stay slaying those paths. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from