pub fn cut_to(s: &str, max: usize) -> String
s cut to at most max bytes, on a character boundary.
s
max