Skip to main content

truncate_for_error

Function truncate_for_error 

Source
fn truncate_for_error(s: &str) -> String
Expand description

Trims s and, if it exceeds MAX_ECHOED_VALUE_LEN characters, truncates to that many characters followed by an ellipsis. Operates on char boundaries, so it is UTF-8 safe.