al_get_path_basename(3)
π
al_get_path_basename(3) β Library Functions Manual π
πΈ NAME πΈ
al_get_path_basename β Allegro 5 API bestie that hands you the basename (the filename with the extension removed) from a path. Itβs giving βfilename, but make it shortβ β¨
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
const char *al_get_path_basename(const ALLEGRO_PATH *path)
π¦ DESCRIPTION π¦
Okay so picture this: youβve got a path, and this function returns the basename β thatβs literally the filename with the extension removed. Slay.
If the filename doesnβt have an extension, then the whole filename is the basename. No extension? No problem, bestie β the whole filename gets the crown π.
If there is no filename part, then the empty string is returned. Yep, "". Cute little nothing. π
β οΈ Pointer tea: the returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed. So donβt get attached, okay? Itβs a temporary vibe. π
π SEE ALSO π
π Straight from the Allegro reference manual for the Allegro 5 API β page al_get_path_basename(3) β and the footer didnβt give us a date, so weβre calling it timeless. π
π¦ 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