al_get_path_extension(3alleg5)
π NAME π
al_get_path_extension β it's giving Allegro 5 API, bestie β¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
const char *al_get_path_extension(const ALLEGRO_PATH *path)
π DESCRIPTION π
Okay so picture this: you've got a path, right? And you want the file extension. Not the whole filename, not the directory, just the juicy little tail end of it. That's literally what this does. It hands you back a pointer to the start of the extension of the filename β meaning everything from that final dot (.) character onwards. Final dot only, no cap. Like if there's a dot party happening, she's showing up to the last one π.
And if there's, like, no dot at all in there? She returns an empty string. No extension, no drama, just vibes π¦.
β οΈ Okay bestie, listen, this part matters: the returned pointer is only valid until the filename part of the path gets modified in any way, or until the path is destroyed. So do NOT be out here holding onto that pointer like it's forever. It's giving "borrowed, not gifted" π. Copy it if you need it later, fr fr.
π SEE ALSO π
And that's the whole page, gorgeous π«Ά β brought to you by the Allegro reference manual, all about al_get_path_extension(3alleg5). Go get that extension, you ate π
β¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms