Skip to content

cf_path_compact

Category: path
GitHub: cute_string.h


Squishes the path to be less than or equal to n characters in length. Returns a new string.

#define cf_path_compact(path, n) spcompact(path, n)
Parameters Description
path The path string.
n Max character count (including nul-byte).

Return Value

Returns a new dynamic string. Free with sfree.

Remarks

Shortform: spcompact(path, n). Inserts ellipses "..." as necessary. Useful for displaying paths in small UI boxes.

cf_path_pop
cf_path_pop_n