pub fn prefix(s: &str, budget: usize) -> &str
The longest prefix of s no longer than budget bytes, cut at a character boundary.
s
budget