spext¶
Category: path
GitHub: cute_file_system.h
Returns the extension of the file for the given path. Returns a new string.
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".
Related Pages¶
spfname
spfname_no_ext
spnorm
spext_equ
sppop
sppopn
spcompact
spdir_of
sptop_of