fn cut_escaped(s: &str, max: usize) -> String
The longest prefix of s whose JSON-escaped form is at most max bytes.
s
max