Skip to main content

prepare

Function prepare 

pub fn prepare(text: &str, omitted: u64) -> (Cow<'_, str>, bool)
Expand description

text as it is kept, for an output of which omitted bytes were left out before: at most MAX_KEPT_BYTES of it (cut on a character boundary), a NUL as U+FFFD, and every line over MAX_LINE_CHARS characters folded onto several lines, so that paging by lines loses nothing. When the output was longer than what is kept (omitted not 0, or text over the bound) the kept text ends with a line that says how much is kept, and the flag is set.