Skip to main content

precompose_string_if_needed

Function precompose_string_if_needed 

Source
pub fn precompose_string_if_needed(input: &str) -> Cow<'_, str>
Expand description

Convert a UTF-8 string from NFD to NFC when precomposition is active.

Returns the input unchanged when precomposition is off, the string is ASCII-only, invalid UTF-8 would be required, or NFC equals the input.