Function roe::lowercase

source ·
pub fn lowercase(slice: &[u8], options: LowercaseMode) -> Lowercase<'_> 
Expand description

Returns an iterator that yields a copy of the bytes in the given slice with all uppercase letters replaced with their lowercase counterparts.

This function treats the given slice as a conventionally UTF-8 string. UTF-8 byte sequences are converted to their Unicode lowercase equivalents. Invalid UTF-8 byte sequences are yielded as is.

The case mapping mode is determined by the given LowercaseMode. See its documentation for details on the available case mapping modes.

§Panics

Not all LowercaseModes are currently implemented. This function will panic if the caller supplies Turkic or case folding lowercasing mode.