al_get_path_extension(3)
okay bestie, welcome to al_get_path_extension(3) β straight out of the Library Functions Manual, and yes itβs the Allegro 5 API. this one is lowkey iconic for grabbing a file extension. letβs get into it π
β¨
π NAME π
al_get_path_extension β Allegro 5 API
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
const char *al_get_path_extension(const ALLEGRO_PATH *path)
π¦ DESCRIPTION π¦
okay so al_get_path_extension literally returns a pointer to the start of the extension of the filename β like everything from the final dot (.) character onwards. no cap. π₯
if thereβs no dot at all, it returns an empty string. thatβs it. thatβs the vibe. π
β οΈ bestie, the returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed. do not get attached and stash that pointer for later β it is not a forever girlie ππ
π SEE ALSO π
mwah π this has been your Allegro reference manual moment, page al_get_path_extension(3) β source/version + date live in that footer energy, and the footer names the Allegro reference manual with no extra version/date numbers on this page. slay safely, bestie π«Άβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms