Skip to content

spext

Category: path
GitHub: cute_file_system.h


Returns the extension of the file for the given path. Returns a new string.

#define spext(s) cf_path_get_ext(s)
Parameters Description
s The path string.

Code Example

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

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

Remarks

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

spfname
spfname_no_ext
spnorm
spext_equ
sppop
sppopn
spcompact
spdir_of
sptop_of