spfname¶
Category: path
GitHub: cute_file_system.h
Returns the filename portion of a path. Returns a new string.
Parameters | Description |
---|---|
s | The path string. |
Code Example¶
Example fetching a filename from a path.
const char filename = spfname("/data/collections/rare/big_gem.txt");
printf("%s\n", filename);
// Prints: big_gem.txt
Remarks¶
Call sfree on the return value when done. sp
stands for "sting path".
Related Pages¶
spnorm
spfname_no_ext
spext
spext_equ
sppop
sppopn
spcompact
spdir_of
sptop_of