Skip to content

spfname_no_ext

Category: path
GitHub: cute_file_system.h


Returns the filename portion of a path without the file extension. Returns a new string.

#define spfname_no_ext(s) cf_path_get_filename_no_ext(s)
Parameters Description
s The path string.

Code Example

Example fetching a filename from a path without the extension attached.

const char filename = spfname("/data/collections/rare/big_gem.txt");
printf("%s\n", filename);
// Prints: big_gem

Remarks

Call sfree on the return value when done. sp stands for "sting path".

spfname
spnorm
spext
spext_equ
sppop
sppopn
spcompact
spdir_of
sptop_of