Make a matched string printable while preserving match ranges in the process.
Returns the index of the next character boundary in the given string.
Preprocesses a line of text for display.
Returns the index of the previous character boundary in the given string.
Returns the proportion of printable ASCII characters in the given buffer.
Replaces non-printable characters in the given byte slice with default printable characters.
Shrink a string to a maximum length, adding an ellipsis in the middle.
Returns a slice of the given string that starts and ends at character boundaries.
Returns a slice of the given string that starts at the beginning and ends at a character
boundary.
Attempts to parse a UTF-8 character from the given byte slice.