al_get_path_basename(3alleg5)

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

✨ 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