Module util

Source
Expand description

Miscellaneous utilities.

Functions§

clamp
cstr
Error-tolerant C string import
opt_utf8_cstr
Converts a char * which is known to be valid UTF-8 into an Option<&str>
utf8_cstr
Converts a char * which is known to be valid UTF-8 into a &str
utf8_cstr_bounds
Gets a known-to-be valid UTF-8 string given start/end-exclusive pointers to its bounds.
utf8_cstr_len
Gets a known-to-be valid UTF-8 string given a pointer to its start and a length.