al_set_path_extension(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– NAME πŸ’–

okay so bestie, welcome to the al_set_path_extension(3) page from the Library Functions Manual β€” it’s part of the Allegro 5 API, and it’s giving β€œlet’s swap this path’s extension” energy. ✨

al_set_path_extension β€” Allegro 5 API 🫢


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

bool al_set_path_extension(ALLEGRO_PATH *path, char const *extension)

πŸŽ€ DESCRIPTION πŸŽ€

So basically, this function replaces the extension of the path with the one you hand it. Like, it literally replaces everything from the final dot (.) character onward, including the dot. periodt. πŸ’…

If the filename of the path has no extension, the given one gets appended. Cute, right? πŸ¦‹

Usually, the new extension you supply should include a leading dot. iykyk. ✨

It returns false if the path contains no filename part β€” i.e. the filename part is the empty string. not it 😭


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’– cute little sign-off: this page is from the Allegro reference manual, for the Allegro 5 API, and ngl there’s no date printed on it β€” so that’s the whole footer tea, 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