Skip to main content

normalize

Function normalize 

Source
pub fn normalize(c: char) -> char
Expand description

Normalize a Unicode character by converting Latin characters which are variants of ASCII characters to their latin equivalent.

Note that this method acts on single chars: if you want to perform full normalization, you should first split on graphemes, and then normalize each grapheme by normalizing the first char in the grapheme.

If a character does not normalize to a single ASCII character, no normalization is performed.

This performs normalization within the following Unicode blocks:

If the character does not fall in this block, it is not normalized.

§Example

normalize('ä') == 'a', normalize('Æ') == 'Æ', normalize('ữ') == 'u'