FcStrBasename(3)

πŸ’… FcStrBasename(3) πŸ’…

okay bestie, welcome to the FcStrBasename(3) manual page β€” yes, the whole page is about grabbing the last component of a filename, and it’s lowkey iconic. πŸŽ€


🌸 NAME 🌸

  • FcStrBasename β€” last component of filename ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fontconfig/fontconfig.h>

FcChar8 * FcStrBasename (const FcChar8 *file);

πŸ’– DESCRIPTION πŸ’–

So you hand it a file, and FcStrBasename gives you back the filename with any leading directory names stripped off. Like, it’s giving β€œjust the last component, ma’am.” πŸ’…

The catch? The returned string lives in newly allocated storage, so you gotta free it when it’s no longer needed. No leaving it hanging around like an unread group chat. 🫢


🫢 that’s the whole vibe, signed off by Fontconfig 2.17.0 on 27 June 2025 🫢
πŸ“¦ where this page comes from