al_get_path_basename(3alleg5)
β¨ NAME β¨
al_get_path_basename β it's giving Allegro 5 API energy π
okay bestie, quick lil intro: this page lives in the Allegro reference manual, and it's all about al_get_path_basename from Allegro 5. buckle up, it's a short one but it's iconic.
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
const char *al_get_path_basename(const ALLEGRO_PATH *path)
π DESCRIPTION π
so basically, this function hands you back the basename β which is just the filename with the extension yeeted off. π«Ά
- if the filename has no extension? then the whole filename is the basename. no notes, that's just how it is. π
- if there's no filename part at all? you get the empty string back.
"". nada. ghosted. π
β οΈ IMPORTANT BESTIE, LISTEN UP: the pointer you get back is only valid until the filename part of the path is modified in any way, or until the path is destroyed. so likeβ¦ do NOT hold onto that pointer like it's your emotional support string. it will betray you. π
π¦ SEE ALSO π¦
iykyk, go read those next, they're the sisters of this function fr fr β¨
and that's the whole page, babe β straight from the Allegro reference manual, al_get_path_basename(3alleg5), Allegro 5 era. mwah ππβ¨
π¦ 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