Skip to main content

Module string

Module string 

Source
Expand description

String utilities. String utilities.

Functionsยง

truncate_bytes
Truncates a String to at most max_bytes bytes, ensuring the result is valid UTF-8 by finding the nearest character boundary.
truncate_chars
Truncates a String to at most max_chars characters.