Implements built-in transforms defined by the Unicode Standard.
These transforms are not defined by rules but by operations in the Unicode Standard:
Any-NFC,Any-NFD,Any-NFKC,Any-NFKD— normalization forms.Any-Lower,Any-Upper,Any-Title— case transformations.Any-Null— identity (no effect).Any-Remove— removes all characters.
Summary
Functions
Applies a built-in transform to a string.
Returns whether the given transform name is a built-in transform.
Returns true if the given name is a case transform (Upper, Lower, Title).
Returns the inverse of a built-in transform name.
Functions
Applies a built-in transform to a string.
Arguments
string— the input string.name— the transform name.
Returns
The transformed string.
Examples
iex> Unicode.Transform.Builtin.apply("hello", "Upper")
"HELLO"
# NFD decomposes "Ä" (U+00C4) into "A" plus a combining diaeresis.
iex> byte_size(Unicode.Transform.Builtin.apply("Ä", "NFD"))
3
Returns whether the given transform name is a built-in transform.
Arguments
name— the transform name string.
Returns
true if the transform is built-in, false otherwise.
Returns true if the given name is a case transform (Upper, Lower, Title).
Arguments
name— the transform name.
Returns
true if the transform is a case transform, false otherwise.
Returns the inverse of a built-in transform name.
Arguments
name— the transform name.
Returns
The inverse transform name, or nil if no inverse exists.