Structs§
Constants§
- EMPTY_
STRING - PRINTABLE_
ASCII_ THRESHOLD - The threshold for considering a buffer to be printable ASCII.
- TAB_
WIDTH
Functions§
- make_
matched_ string_ printable - Make a matched string printable while preserving match ranges in the process.
- next_
char_ boundary - Returns the index of the next character boundary in the given string.
- preprocess_
line - Preprocesses a line of text for display.
- prev_
char_ boundary - Returns the index of the previous character boundary in the given string.
- proportion_
of_ printable_ ascii_ characters - Returns the proportion of printable ASCII characters in the given buffer.
- replace_
non_ printable - Replaces non-printable characters in the given byte slice with default printable characters.
- shrink_
with_ ellipsis - Shrink a string to a maximum length, adding an ellipsis in the middle.
- slice_
at_ char_ boundaries - Returns a slice of the given string that starts and ends at character boundaries.
- slice_
up_ to_ char_ boundary - Returns a slice of the given string that starts at the beginning and ends at a character boundary.
- try_
parse_ utf8_ char - Attempts to parse a UTF-8 character from the given byte slice.