al_get_path_component(3alleg5)

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

✨ NAME ✨

okay so bestie, welcome to al_get_path_component β€” it's giving Allegro 5 API energy, and it's literally here to hand you one little piece of a path πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

const char *al_get_path_component(const ALLEGRO_PATH *path, int i)

πŸ’… DESCRIPTION πŸ’…

so like, this function returns the i'th directory component of a path, and we're counting from zero β€” yes bestie, zero-indexed, that's the vibe 😌

if the index is negative, then you count from the right instead. so -1 refers to the last path component. periodt. πŸ’–

⚠️ okay but for real, it is an error to pass an index which is out of bounds. like, don't do that. it's not the move. 🫠

πŸ¦‹ SEE ALSO πŸ¦‹


Allegro reference manual Β· al_get_path_component(3alleg5) β€” that's the whole page bestie, go slay some path components πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from