fn truncate_output(bytes: &[u8], max: usize) -> String
Lossy-UTF8 a captured stream and cap it at max bytes (on a char boundary), flagging truncation. Pure.
max