al_get_path_basename

const char *al_get_path_basename(const ALLEGRO_PATH *path)
Introduced in 5.0.0

Return the basename, i.e. filename with the extension removed. If the filename doesn't have an extension, the whole filename is the basename. If there is no filename part then the empty string is returned.

The returned pointer is valid only until the filename part of the path is modified in any way, or until the path is destroyed.

See also: al_get_path_filename, al_get_path_extension

Examples: ex_path_test


Most helpful discussions: