Functions to introspect Unicode bidi classes for binaries (Strings) and codepoints.
Summary
Functions
Returns a map of aliases for Unicode bidi classes.
Returns the bidi class name(s) for the given binary or codepoint.
Returns the map of Unicode bidi classes.
Returns the count of the number of characters for a given bidi class.
Returns the Unicode ranges for a given bidi class as a list of ranges as 2-tuples.
Returns the Unicode ranges for a given bidi class as a list of ranges as 2-tuples.
Returns a list of known Unicode bidi class names.
Functions
Returns a map of aliases for Unicode bidi classes.
An alias is an alternative name
for referring to a bidi class. Aliases
are resolved by the fetch/1 and
get/1 functions.
Returns the bidi class name(s) for the given binary or codepoint.
In the case of a codepoint, a single bidi class name is returned.
For a binary a list of distinct bidi class names represented by the codepoints in the binary is returned.
Examples
iex> Unicode.BidiClass.bidi_class ?A
:l
iex> Unicode.BidiClass.bidi_class ?0
:en
iex> Unicode.BidiClass.bidi_class 0x05D0
:r
iex> Unicode.BidiClass.bidi_class 0x0627
:al
Returns the map of Unicode bidi classes.
The bidi class name is the map key and a list of codepoint ranges as tuples as the value.
Returns the count of the number of characters for a given bidi class.
Example
iex> Unicode.BidiClass.count(:al)
1478
Returns the Unicode ranges for a given bidi class as a list of ranges as 2-tuples.
Aliases are resolved by this function.
Returns either {:ok, range_list} or
:error.
Returns the Unicode ranges for a given bidi class as a list of ranges as 2-tuples.
Aliases are resolved by this function.
Returns either range_list or
nil.
Returns a list of known Unicode bidi class names.
This function does not return the names of any class aliases.