3 ms·
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a521485a30890b1f79a0888fe107abe7 https://play.rust-lang.org/?version=stable&mode=debug&e
by Tyr42 7y ago
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=a521485a30890b1f79a0888fe107abe7 https://play.rust-lang.org/?version=stable&mode=debug&editio...
Something like this? Check if each character pushes the byte total over the limit?
I think this might fail for combining characters though.