spcompact¶
Category: path
GitHub: cute_file_system.h
Squishes the path to be less than or equal to n characters in length.
Parameters | Description |
---|---|
s | The path string. |
n | The number of files to pop from the directory path. |
Return Value¶
If the string is not a dynamic string from CF's string API, a new string is returned. Otherwise the string is modified in-place. You must call sfree if a new dynamic string is returned, when done.
Remarks¶
This will insert ellipses "..." into the path as necessary. This function is useful for displaying paths and visualizing them in small boxes or windows. n includes the nul-byte. Returns a new string.
Related Pages¶
spfname
spfname_no_ext
spext
spext_equ
sppop
sppopn
spnorm
spdir_of
sptop_of