Unicode.Block — Unicode v1.12.0
Unicode.Block (Unicode v1.12.0) View Source Functions to introspect Unicode blocks for binaries (Strings) and codepoints. Link to this section Summary Functions aliases() Returns a map of aliases for Unicode blocks. assigned() Returns a list of tuples representing the assigned ranges of all Unicode code points. block(string) Returns the block name(s) for the given binary or codepoint. blocks() Returns the map of Unicode blocks. count(block) Returns the count of the number of characters for a given block. fetch(block) Returns the Unicode ranges for a given block as a list of ranges as 2-tuples. get(block) Returns the Unicode ranges for a given block as a list of ranges as 2-tuples. known_blocks() Returns a list of known Unicode block names.
Link to this section Functions Link to this function aliases() View Source Returns a map of aliases for Unicode blocks. An alias is an alternative name for referring to a block. Aliases are resolved by the fetch/1 and get/1 functions. Link to this function assigned() View Source Returns a list of tuples representing the assigned ranges of all Unicode code points. Link to this function block(string) View Source Returns the block name(s) for the given binary or codepoint.
In the case of a codepoint, a single block name is returned. For a binary a list of distinct block names represented by the graphemes in the binary is returned. Link to this function blocks() View Source Returns the map of Unicode blocks. The block name is the map key and a list of codepoint ranges as tuples as the value. Link to this function count(block) View Source Returns the count of the number of characters for a given block.
Aliases are resolved by this function. Example iex> Unicode.Block . count ( :old_north_arabian ) 32 Link to this function fetch(block) View Source Returns the Unicode ranges for a given block as a list of ranges as 2-tuples. Aliases are resolved by this function. Returns either {:ok, range_list} or :error . Link to this function get(block) View Source Returns the Unicode ranges for a given block as a list of ranges as 2-tuples.
Aliases are resolved by this function. Returns either range_list or nil . Link to this function known_blocks() View Source Returns a list of known Unicode block names. This function does not return the names of any block aliases.