pub fn uppercase(slice: &[u8], options: UppercaseMode) -> Uppercase<'_> ⓘ
Expand description
Returns an iterator that yields a copy of the bytes in the given slice with all lowercase letters replaced with their uppercase counterparts.
This function treats the given slice as a conventionally UTF-8 string. UTF-8 byte sequences are converted to their Unicode uppercase equivalents. Invalid UTF-8 byte sequences are yielded as is.
The case mapping mode is determined by the given UppercaseMode
. See its
documentation for details on the available case mapping modes.
§Panics
Not all UppercaseMode
s are currently implemented. This function will
panic if the caller supplies Turkic uppercasing mode.