Skip to main content

truncate_output

Function truncate_output 

Source
pub fn truncate_output(output: String, max_bytes: usize) -> (String, bool)
Expand description

Truncate output to the given byte limit. Returns the (possibly truncated) string and whether truncation occurred.