Function convert_while_ascii
pub unsafe fn convert_while_ascii(s: &str, convert: fn(&u8) -> u8) -> (String, &str)
Converts leading ascii bytes in s by calling the convert function.
For better average performance, this happens in chunks of 2*size_of::<usize>().
Returns a tuple of the converted prefix and the remainder starting from the first non-ascii character.
This function is only public so that it can be verified in a codegen test,
see issue-123712-str-to-lower-autovectorization.rs.
Safety
convert must return an ASCII byte for every ASCII input byte.