Unicode.Property (Unicode v2.0.0)

Copy Markdown View Source

Functions to introspect Unicode properties for binaries (Strings) and codepoints.

The functions in this module only represent boolean properties. That is, properties that are either true or false - or in several cases represented as "has property" or "does not have property".

Summary

Functions

Returns a map of aliases for Unicode properties.

Returns :alphabetic or nil indicating if the codepoint or string has the property :alphabetic.

Returns a boolean indicating if the codepoint or string has the property :alphabetic.

Returns :alphanumeric or nil based upon whether the given codepoint or binary is all alphanumeric characters.

Returns a boolean based upon whether the given codepoint or binary is all alphanumeric characters.

Returns :ascii_hex_digit or nil indicating if the codepoint or string has the property :ascii_hex_digit.

Returns a boolean indicating if the codepoint or string has the property :ascii_hex_digit.

Returns :bidi_control or nil indicating if the codepoint or string has the property :bidi_control.

Returns a boolean indicating if the codepoint or string has the property :bidi_control.

Returns :case_ignorable or nil indicating if the codepoint or string has the property :case_ignorable.

Returns a boolean indicating if the codepoint or string has the property :case_ignorable.

Returns :cased or nil indicating if the codepoint or string has the property :cased.

Returns a boolean indicating if the codepoint or string has the property :cased.

Returns :changes_when_casefolded or nil indicating if the codepoint or string has the property :changes_when_casefolded.

Returns a boolean indicating if the codepoint or string has the property :changes_when_casefolded.

Returns :changes_when_casemapped or nil indicating if the codepoint or string has the property :changes_when_casemapped.

Returns a boolean indicating if the codepoint or string has the property :changes_when_casemapped.

Returns :changes_when_lowercased or nil indicating if the codepoint or string has the property :changes_when_lowercased.

Returns a boolean indicating if the codepoint or string has the property :changes_when_lowercased.

Returns :changes_when_titlecased or nil indicating if the codepoint or string has the property :changes_when_titlecased.

Returns a boolean indicating if the codepoint or string has the property :changes_when_titlecased.

Returns :changes_when_uppercased or nil indicating if the codepoint or string has the property :changes_when_uppercased.

Returns a boolean indicating if the codepoint or string has the property :changes_when_uppercased.

Returns the count of the number of characters for a given property.

Returns :dash or nil indicating if the codepoint or string has the property :dash.

Returns a boolean indicating if the codepoint or string has the property :dash.

Returns :default_ignorable_code_point or nil indicating if the codepoint or string has the property :default_ignorable_code_point.

Returns a boolean indicating if the codepoint or string has the property :default_ignorable_code_point.

Returns :deprecated or nil indicating if the codepoint or string has the property :deprecated.

Returns a boolean indicating if the codepoint or string has the property :deprecated.

Returns :diacritic or nil indicating if the codepoint or string has the property :diacritic.

Returns a boolean indicating if the codepoint or string has the property :diacritic.

Returns :emoji or nil indicating if the codepoint or string has the property :emoji.

Returns a boolean indicating if the codepoint or string has the property :emoji.

Returns :emoji_component or nil indicating if the codepoint or string has the property :emoji_component.

Returns a boolean indicating if the codepoint or string has the property :emoji_component.

Returns :emoji_modifier or nil indicating if the codepoint or string has the property :emoji_modifier.

Returns a boolean indicating if the codepoint or string has the property :emoji_modifier.

Returns :emoji_modifier_base or nil indicating if the codepoint or string has the property :emoji_modifier_base.

Returns a boolean indicating if the codepoint or string has the property :emoji_modifier_base.

Returns :emoji_presentation or nil indicating if the codepoint or string has the property :emoji_presentation.

Returns a boolean indicating if the codepoint or string has the property :emoji_presentation.

Returns :extended_numeric or nil based upon whether the given codepoint or binary is all extended numeric characters.

Returns a boolean based upon whether the given codepoint or binary is all extended numeric characters.

Returns :extended_pictographic or nil indicating if the codepoint or string has the property :extended_pictographic.

Returns a boolean indicating if the codepoint or string has the property :extended_pictographic.

Returns :extender or nil indicating if the codepoint or string has the property :extender.

Returns a boolean indicating if the codepoint or string has the property :extender.

Returns the Unicode ranges for a given property as a list of ranges as 2-tuples.

Returns the Unicode ranges for a given property as a list of ranges as 2-tuples.

Returns :grapheme_base or nil indicating if the codepoint or string has the property :grapheme_base.

Returns a boolean indicating if the codepoint or string has the property :grapheme_base.

Returns :grapheme_extend or nil indicating if the codepoint or string has the property :grapheme_extend.

Returns a boolean indicating if the codepoint or string has the property :grapheme_extend.

Returns :grapheme_link or nil indicating if the codepoint or string has the property :grapheme_link.

Returns a boolean indicating if the codepoint or string has the property :grapheme_link.

Returns :hex_digit or nil indicating if the codepoint or string has the property :hex_digit.

Returns a boolean indicating if the codepoint or string has the property :hex_digit.

Returns :hyphen or nil indicating if the codepoint or string has the property :hyphen.

Returns a boolean indicating if the codepoint or string has the property :hyphen.

Returns :id_compat_math_continue or nil indicating if the codepoint or string has the property :id_compat_math_continue.

Returns a boolean indicating if the codepoint or string has the property :id_compat_math_continue.

Returns :id_compat_math_start or nil indicating if the codepoint or string has the property :id_compat_math_start.

Returns a boolean indicating if the codepoint or string has the property :id_compat_math_start.

Returns :id_continue or nil indicating if the codepoint or string has the property :id_continue.

Returns a boolean indicating if the codepoint or string has the property :id_continue.

Returns :id_start or nil indicating if the codepoint or string has the property :id_start.

Returns a boolean indicating if the codepoint or string has the property :id_start.

Returns :ideographic or nil indicating if the codepoint or string has the property :ideographic.

Returns a boolean indicating if the codepoint or string has the property :ideographic.

Returns :ids_binary_operator or nil indicating if the codepoint or string has the property :ids_binary_operator.

Returns a boolean indicating if the codepoint or string has the property :ids_binary_operator.

Returns :ids_trinary_operator or nil indicating if the codepoint or string has the property :ids_trinary_operator.

Returns a boolean indicating if the codepoint or string has the property :ids_trinary_operator.

Returns :ids_unary_operator or nil indicating if the codepoint or string has the property :ids_unary_operator.

Returns a boolean indicating if the codepoint or string has the property :ids_unary_operator.

Returns :incb or nil indicating if the codepoint or string has the property :incb.

Returns a boolean indicating if the codepoint or string has the property :incb.

Returns :join_control or nil indicating if the codepoint or string has the property :join_control.

Returns a boolean indicating if the codepoint or string has the property :join_control.

Returns a list of known Unicode property names.

Returns :logical_order_exception or nil indicating if the codepoint or string has the property :logical_order_exception.

Returns a boolean indicating if the codepoint or string has the property :logical_order_exception.

Returns :lowercase or nil indicating if the codepoint or string has the property :lowercase.

Returns a boolean indicating if the codepoint or string has the property :lowercase.

Returns :math or nil indicating if the codepoint or string has the property :math.

Returns a boolean indicating if the codepoint or string has the property :math.

Returns :modifier_combining_mark or nil indicating if the codepoint or string has the property :modifier_combining_mark.

Returns a boolean indicating if the codepoint or string has the property :modifier_combining_mark.

Returns :noncharacter_code_point or nil indicating if the codepoint or string has the property :noncharacter_code_point.

Returns a boolean indicating if the codepoint or string has the property :noncharacter_code_point.

Returns :numeric or nil based upon whether the given codepoint or binary is all numeric characters.

Returns a boolean based upon whether the given codepoint or binary is all numeric characters.

Returns :other_alphabetic or nil indicating if the codepoint or string has the property :other_alphabetic.

Returns a boolean indicating if the codepoint or string has the property :other_alphabetic.

Returns :other_default_ignorable_code_point or nil indicating if the codepoint or string has the property :other_default_ignorable_code_point.

Returns a boolean indicating if the codepoint or string has the property :other_default_ignorable_code_point.

Returns :other_grapheme_extend or nil indicating if the codepoint or string has the property :other_grapheme_extend.

Returns a boolean indicating if the codepoint or string has the property :other_grapheme_extend.

Returns :other_id_continue or nil indicating if the codepoint or string has the property :other_id_continue.

Returns a boolean indicating if the codepoint or string has the property :other_id_continue.

Returns :other_id_start or nil indicating if the codepoint or string has the property :other_id_start.

Returns a boolean indicating if the codepoint or string has the property :other_id_start.

Returns :other_lowercase or nil indicating if the codepoint or string has the property :other_lowercase.

Returns a boolean indicating if the codepoint or string has the property :other_lowercase.

Returns :other_math or nil indicating if the codepoint or string has the property :other_math.

Returns a boolean indicating if the codepoint or string has the property :other_math.

Returns :other_uppercase or nil indicating if the codepoint or string has the property :other_uppercase.

Returns a boolean indicating if the codepoint or string has the property :other_uppercase.

Returns :pattern_syntax or nil indicating if the codepoint or string has the property :pattern_syntax.

Returns a boolean indicating if the codepoint or string has the property :pattern_syntax.

Returns :pattern_white_space or nil indicating if the codepoint or string has the property :pattern_white_space.

Returns a boolean indicating if the codepoint or string has the property :pattern_white_space.

Returns :prepended_concatenation_mark or nil indicating if the codepoint or string has the property :prepended_concatenation_mark.

Returns a boolean indicating if the codepoint or string has the property :prepended_concatenation_mark.

Returns the map of Unicode properties.

Returns the property name(s) for the given binary or codepoint.

Returns :quotation_mark or nil indicating if the codepoint or string has the property :quotation_mark.

Returns a boolean indicating if the codepoint or string has the property :quotation_mark.

Returns :radical or nil indicating if the codepoint or string has the property :radical.

Returns a boolean indicating if the codepoint or string has the property :radical.

Returns :regional_indicator or nil indicating if the codepoint or string has the property :regional_indicator.

Returns a boolean indicating if the codepoint or string has the property :regional_indicator.

Returns :sentence_terminal or nil indicating if the codepoint or string has the property :sentence_terminal.

Returns a boolean indicating if the codepoint or string has the property :sentence_terminal.

Returns a map of properties to the module that serves that property.

Returns :soft_dotted or nil indicating if the codepoint or string has the property :soft_dotted.

Returns a boolean indicating if the codepoint or string has the property :soft_dotted.

Returns :terminal_punctuation or nil indicating if the codepoint or string has the property :terminal_punctuation.

Returns a boolean indicating if the codepoint or string has the property :terminal_punctuation.

Returns :unified_ideograph or nil indicating if the codepoint or string has the property :unified_ideograph.

Returns a boolean indicating if the codepoint or string has the property :unified_ideograph.

Returns :uppercase or nil indicating if the codepoint or string has the property :uppercase.

Returns a boolean indicating if the codepoint or string has the property :uppercase.

Returns :variation_selector or nil indicating if the codepoint or string has the property :variation_selector.

Returns a boolean indicating if the codepoint or string has the property :variation_selector.

Returns :white_space or nil indicating if the codepoint or string has the property :white_space.

Returns a boolean indicating if the codepoint or string has the property :white_space.

Returns :xid_continue or nil indicating if the codepoint or string has the property :xid_continue.

Returns a boolean indicating if the codepoint or string has the property :xid_continue.

Returns :xid_start or nil indicating if the codepoint or string has the property :xid_start.

Returns a boolean indicating if the codepoint or string has the property :xid_start.

Types

string_or_codepoint()

@type string_or_codepoint() :: String.t() | non_neg_integer()

Functions

aliases()

Returns a map of aliases for Unicode properties.

An alias is an alternative name for referring to a property. Aliases are resolved by the fetch/1 and get/1 functions.

Returns

  • A map of property aliases to property names.

Examples

iex> Unicode.Property.aliases() |> Map.get("alpha")
:alphabetic

alphabetic(codepoint)

Returns :alphabetic or nil indicating if the codepoint or string has the property :alphabetic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :alphabetic or nil. For a string, the result is :alphabetic only if all codepoints in the string have the :alphabetic property.

alphabetic?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :alphabetic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :alphabetic property.

alphanumeric(codepoint_or_binary)

Returns :alphanumeric or nil based upon whether the given codepoint or binary is all alphanumeric characters.

This is useful when the desired result is truthy or falsy.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • :alphanumeric or

  • nil.

Examples

iex> Unicode.Property.alphanumeric "123abc"
:alphanumeric

iex> Unicode.Property.alphanumeric "???"
nil

alphanumeric?(codepoint_or_binary)

Returns a boolean based upon whether the given codepoint or binary is all alphanumeric characters.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string are alphanumeric.

Examples

iex> Unicode.Property.alphanumeric? "123abc"
true

iex> Unicode.Property.alphanumeric? "⅔"
false

ascii_hex_digit(codepoint)

Returns :ascii_hex_digit or nil indicating if the codepoint or string has the property :ascii_hex_digit.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :ascii_hex_digit or nil. For a string, the result is :ascii_hex_digit only if all codepoints in the string have the :ascii_hex_digit property.

ascii_hex_digit?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :ascii_hex_digit.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :ascii_hex_digit property.

bidi_control(codepoint)

Returns :bidi_control or nil indicating if the codepoint or string has the property :bidi_control.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :bidi_control or nil. For a string, the result is :bidi_control only if all codepoints in the string have the :bidi_control property.

bidi_control?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :bidi_control.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :bidi_control property.

case_ignorable(codepoint)

Returns :case_ignorable or nil indicating if the codepoint or string has the property :case_ignorable.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :case_ignorable or nil. For a string, the result is :case_ignorable only if all codepoints in the string have the :case_ignorable property.

case_ignorable?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :case_ignorable.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :case_ignorable property.

cased(codepoint)

Returns :cased or nil indicating if the codepoint or string has the property :cased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :cased or nil. For a string, the result is :cased only if all codepoints in the string have the :cased property.

cased?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :cased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :cased property.

changes_when_casefolded(codepoint)

Returns :changes_when_casefolded or nil indicating if the codepoint or string has the property :changes_when_casefolded.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :changes_when_casefolded or nil. For a string, the result is :changes_when_casefolded only if all codepoints in the string have the :changes_when_casefolded property.

changes_when_casefolded?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :changes_when_casefolded.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :changes_when_casefolded property.

changes_when_casemapped(codepoint)

Returns :changes_when_casemapped or nil indicating if the codepoint or string has the property :changes_when_casemapped.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :changes_when_casemapped or nil. For a string, the result is :changes_when_casemapped only if all codepoints in the string have the :changes_when_casemapped property.

changes_when_casemapped?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :changes_when_casemapped.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :changes_when_casemapped property.

changes_when_lowercased(codepoint)

Returns :changes_when_lowercased or nil indicating if the codepoint or string has the property :changes_when_lowercased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :changes_when_lowercased or nil. For a string, the result is :changes_when_lowercased only if all codepoints in the string have the :changes_when_lowercased property.

changes_when_lowercased?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :changes_when_lowercased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :changes_when_lowercased property.

changes_when_titlecased(codepoint)

Returns :changes_when_titlecased or nil indicating if the codepoint or string has the property :changes_when_titlecased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :changes_when_titlecased or nil. For a string, the result is :changes_when_titlecased only if all codepoints in the string have the :changes_when_titlecased property.

changes_when_titlecased?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :changes_when_titlecased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :changes_when_titlecased property.

changes_when_uppercased(codepoint)

Returns :changes_when_uppercased or nil indicating if the codepoint or string has the property :changes_when_uppercased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :changes_when_uppercased or nil. For a string, the result is :changes_when_uppercased only if all codepoints in the string have the :changes_when_uppercased property.

changes_when_uppercased?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :changes_when_uppercased.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :changes_when_uppercased property.

count(property)

Returns the count of the number of characters for a given property.

Arguments

  • property is a property name as an atom.

Returns

  • The number of codepoints that have the given property.

Examples

iex> Unicode.Property.count(:lowercase)
2595

dash(codepoint)

Returns :dash or nil indicating if the codepoint or string has the property :dash.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :dash or nil. For a string, the result is :dash only if all codepoints in the string have the :dash property.

dash?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :dash.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :dash property.

default_ignorable_code_point(codepoint)

Returns :default_ignorable_code_point or nil indicating if the codepoint or string has the property :default_ignorable_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :default_ignorable_code_point or nil. For a string, the result is :default_ignorable_code_point only if all codepoints in the string have the :default_ignorable_code_point property.

default_ignorable_code_point?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :default_ignorable_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :default_ignorable_code_point property.

deprecated(codepoint)

Returns :deprecated or nil indicating if the codepoint or string has the property :deprecated.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :deprecated or nil. For a string, the result is :deprecated only if all codepoints in the string have the :deprecated property.

deprecated?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :deprecated.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :deprecated property.

diacritic(codepoint)

Returns :diacritic or nil indicating if the codepoint or string has the property :diacritic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :diacritic or nil. For a string, the result is :diacritic only if all codepoints in the string have the :diacritic property.

diacritic?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :diacritic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :diacritic property.

emoji(codepoint)

Returns :emoji or nil indicating if the codepoint or string has the property :emoji.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :emoji or nil. For a string, the result is :emoji only if all codepoints in the string have the :emoji property.

emoji?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :emoji.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :emoji property.

emoji_component(codepoint)

Returns :emoji_component or nil indicating if the codepoint or string has the property :emoji_component.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :emoji_component or nil. For a string, the result is :emoji_component only if all codepoints in the string have the :emoji_component property.

emoji_component?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :emoji_component.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :emoji_component property.

emoji_modifier(codepoint)

Returns :emoji_modifier or nil indicating if the codepoint or string has the property :emoji_modifier.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :emoji_modifier or nil. For a string, the result is :emoji_modifier only if all codepoints in the string have the :emoji_modifier property.

emoji_modifier?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :emoji_modifier.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :emoji_modifier property.

emoji_modifier_base(codepoint)

Returns :emoji_modifier_base or nil indicating if the codepoint or string has the property :emoji_modifier_base.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :emoji_modifier_base or nil. For a string, the result is :emoji_modifier_base only if all codepoints in the string have the :emoji_modifier_base property.

emoji_modifier_base?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :emoji_modifier_base.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :emoji_modifier_base property.

emoji_presentation(codepoint)

Returns :emoji_presentation or nil indicating if the codepoint or string has the property :emoji_presentation.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :emoji_presentation or nil. For a string, the result is :emoji_presentation only if all codepoints in the string have the :emoji_presentation property.

emoji_presentation?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :emoji_presentation.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :emoji_presentation property.

extended_numeric(codepoint_or_binary)

Returns :extended_numeric or nil based upon whether the given codepoint or binary is all extended numeric characters.

Extended numeric includes fractions, superscripts, subscripts and other characters in the category No.

This is useful when the desired result is truthy or falsy.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • :extended_numeric or

  • nil.

Examples

iex> Unicode.Property.extended_numeric "123"
:extended_numeric

iex> Unicode.Property.extended_numeric "⅔"
:extended_numeric

iex> Unicode.Property.extended_numeric "-123"
nil

extended_numeric?(codepoint_or_binary)

Returns a boolean based upon whether the given codepoint or binary is all extended numeric characters.

Extended numeric includes fractions, superscripts, subscripts and other characters in the category No.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string are extended numeric.

Examples

iex> Unicode.Property.extended_numeric? "123"
true

iex> Unicode.Property.extended_numeric? "⅔"
true

extended_pictographic(codepoint)

Returns :extended_pictographic or nil indicating if the codepoint or string has the property :extended_pictographic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :extended_pictographic or nil. For a string, the result is :extended_pictographic only if all codepoints in the string have the :extended_pictographic property.

extended_pictographic?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :extended_pictographic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :extended_pictographic property.

extender(codepoint)

Returns :extender or nil indicating if the codepoint or string has the property :extender.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :extender or nil. For a string, the result is :extender only if all codepoints in the string have the :extender property.

extender?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :extender.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :extender property.

fetch(property)

Returns the Unicode ranges for a given property as a list of ranges as 2-tuples.

Aliases are resolved by this function.

Arguments

  • property is a property name as a string or atom.

Returns

  • {:ok, range_list} or

  • :error if the property is not known.

Examples

iex> {:ok, ranges} = Unicode.Property.fetch(:alphabetic)
iex> Enum.take(ranges, 2)
[{65, 90}, {97, 122}]

iex> Unicode.Property.fetch(:not_a_property)
:error

get(property)

Returns the Unicode ranges for a given property as a list of ranges as 2-tuples.

Aliases are resolved by this function.

Arguments

  • property is a property name as a string or atom.

Returns

  • range_list or

  • nil if the property is not known.

Examples

iex> Unicode.Property.get(:alphabetic) |> Enum.take(2)
[{65, 90}, {97, 122}]

iex> Unicode.Property.get(:not_a_property)
nil

grapheme_base(codepoint)

Returns :grapheme_base or nil indicating if the codepoint or string has the property :grapheme_base.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :grapheme_base or nil. For a string, the result is :grapheme_base only if all codepoints in the string have the :grapheme_base property.

grapheme_base?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :grapheme_base.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :grapheme_base property.

grapheme_extend(codepoint)

Returns :grapheme_extend or nil indicating if the codepoint or string has the property :grapheme_extend.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :grapheme_extend or nil. For a string, the result is :grapheme_extend only if all codepoints in the string have the :grapheme_extend property.

grapheme_extend?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :grapheme_extend.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :grapheme_extend property.

grapheme_link(codepoint)

Returns :grapheme_link or nil indicating if the codepoint or string has the property :grapheme_link.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :grapheme_link or nil. For a string, the result is :grapheme_link only if all codepoints in the string have the :grapheme_link property.

grapheme_link?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :grapheme_link.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :grapheme_link property.

hex_digit(codepoint)

Returns :hex_digit or nil indicating if the codepoint or string has the property :hex_digit.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :hex_digit or nil. For a string, the result is :hex_digit only if all codepoints in the string have the :hex_digit property.

hex_digit?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :hex_digit.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :hex_digit property.

hyphen(codepoint)

Returns :hyphen or nil indicating if the codepoint or string has the property :hyphen.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :hyphen or nil. For a string, the result is :hyphen only if all codepoints in the string have the :hyphen property.

hyphen?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :hyphen.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :hyphen property.

id_compat_math_continue(codepoint)

Returns :id_compat_math_continue or nil indicating if the codepoint or string has the property :id_compat_math_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :id_compat_math_continue or nil. For a string, the result is :id_compat_math_continue only if all codepoints in the string have the :id_compat_math_continue property.

id_compat_math_continue?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :id_compat_math_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :id_compat_math_continue property.

id_compat_math_start(codepoint)

Returns :id_compat_math_start or nil indicating if the codepoint or string has the property :id_compat_math_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :id_compat_math_start or nil. For a string, the result is :id_compat_math_start only if all codepoints in the string have the :id_compat_math_start property.

id_compat_math_start?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :id_compat_math_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :id_compat_math_start property.

id_continue(codepoint)

Returns :id_continue or nil indicating if the codepoint or string has the property :id_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :id_continue or nil. For a string, the result is :id_continue only if all codepoints in the string have the :id_continue property.

id_continue?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :id_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :id_continue property.

id_start(codepoint)

Returns :id_start or nil indicating if the codepoint or string has the property :id_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :id_start or nil. For a string, the result is :id_start only if all codepoints in the string have the :id_start property.

id_start?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :id_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :id_start property.

ideographic(codepoint)

Returns :ideographic or nil indicating if the codepoint or string has the property :ideographic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :ideographic or nil. For a string, the result is :ideographic only if all codepoints in the string have the :ideographic property.

ideographic?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :ideographic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :ideographic property.

ids_binary_operator(codepoint)

Returns :ids_binary_operator or nil indicating if the codepoint or string has the property :ids_binary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :ids_binary_operator or nil. For a string, the result is :ids_binary_operator only if all codepoints in the string have the :ids_binary_operator property.

ids_binary_operator?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :ids_binary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :ids_binary_operator property.

ids_trinary_operator(codepoint)

Returns :ids_trinary_operator or nil indicating if the codepoint or string has the property :ids_trinary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :ids_trinary_operator or nil. For a string, the result is :ids_trinary_operator only if all codepoints in the string have the :ids_trinary_operator property.

ids_trinary_operator?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :ids_trinary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :ids_trinary_operator property.

ids_unary_operator(codepoint)

Returns :ids_unary_operator or nil indicating if the codepoint or string has the property :ids_unary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :ids_unary_operator or nil. For a string, the result is :ids_unary_operator only if all codepoints in the string have the :ids_unary_operator property.

ids_unary_operator?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :ids_unary_operator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :ids_unary_operator property.

incb(codepoint)

Returns :incb or nil indicating if the codepoint or string has the property :incb.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :incb or nil. For a string, the result is :incb only if all codepoints in the string have the :incb property.

incb?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :incb.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :incb property.

join_control(codepoint)

Returns :join_control or nil indicating if the codepoint or string has the property :join_control.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :join_control or nil. For a string, the result is :join_control only if all codepoints in the string have the :join_control property.

join_control?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :join_control.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :join_control property.

known_properties()

Returns a list of known Unicode property names.

This function does not return the names of any property aliases.

Returns

  • A list of atom property names.

Examples

iex> :alphabetic in Unicode.Property.known_properties()
true

logical_order_exception(codepoint)

Returns :logical_order_exception or nil indicating if the codepoint or string has the property :logical_order_exception.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :logical_order_exception or nil. For a string, the result is :logical_order_exception only if all codepoints in the string have the :logical_order_exception property.

logical_order_exception?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :logical_order_exception.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :logical_order_exception property.

lowercase(codepoint)

Returns :lowercase or nil indicating if the codepoint or string has the property :lowercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :lowercase or nil. For a string, the result is :lowercase only if all codepoints in the string have the :lowercase property.

lowercase?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :lowercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :lowercase property.

math(codepoint)

Returns :math or nil indicating if the codepoint or string has the property :math.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :math or nil. For a string, the result is :math only if all codepoints in the string have the :math property.

math?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :math.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :math property.

modifier_combining_mark(codepoint)

Returns :modifier_combining_mark or nil indicating if the codepoint or string has the property :modifier_combining_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :modifier_combining_mark or nil. For a string, the result is :modifier_combining_mark only if all codepoints in the string have the :modifier_combining_mark property.

modifier_combining_mark?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :modifier_combining_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :modifier_combining_mark property.

noncharacter_code_point(codepoint)

Returns :noncharacter_code_point or nil indicating if the codepoint or string has the property :noncharacter_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :noncharacter_code_point or nil. For a string, the result is :noncharacter_code_point only if all codepoints in the string have the :noncharacter_code_point property.

noncharacter_code_point?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :noncharacter_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :noncharacter_code_point property.

numeric(codepoint_or_binary)

Returns :numeric or nil based upon whether the given codepoint or binary is all numeric characters.

This is useful when the desired result is truthy or falsy.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • :numeric or

  • nil.

Examples

iex> Unicode.Property.numeric "123"
:numeric

iex> Unicode.Property.numeric "123a"
nil

numeric?(codepoint)

Returns a boolean based upon whether the given codepoint or binary is all numeric characters.

Arguments

  • codepoint_or_binary is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string are numeric.

Examples

iex> Unicode.Property.numeric? "123"
true

iex> Unicode.Property.numeric? "123a"
false

other_alphabetic(codepoint)

Returns :other_alphabetic or nil indicating if the codepoint or string has the property :other_alphabetic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_alphabetic or nil. For a string, the result is :other_alphabetic only if all codepoints in the string have the :other_alphabetic property.

other_alphabetic?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_alphabetic.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_alphabetic property.

other_default_ignorable_code_point(codepoint)

Returns :other_default_ignorable_code_point or nil indicating if the codepoint or string has the property :other_default_ignorable_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_default_ignorable_code_point or nil. For a string, the result is :other_default_ignorable_code_point only if all codepoints in the string have the :other_default_ignorable_code_point property.

other_default_ignorable_code_point?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_default_ignorable_code_point.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_default_ignorable_code_point property.

other_grapheme_extend(codepoint)

Returns :other_grapheme_extend or nil indicating if the codepoint or string has the property :other_grapheme_extend.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_grapheme_extend or nil. For a string, the result is :other_grapheme_extend only if all codepoints in the string have the :other_grapheme_extend property.

other_grapheme_extend?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_grapheme_extend.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_grapheme_extend property.

other_id_continue(codepoint)

Returns :other_id_continue or nil indicating if the codepoint or string has the property :other_id_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_id_continue or nil. For a string, the result is :other_id_continue only if all codepoints in the string have the :other_id_continue property.

other_id_continue?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_id_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_id_continue property.

other_id_start(codepoint)

Returns :other_id_start or nil indicating if the codepoint or string has the property :other_id_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_id_start or nil. For a string, the result is :other_id_start only if all codepoints in the string have the :other_id_start property.

other_id_start?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_id_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_id_start property.

other_lowercase(codepoint)

Returns :other_lowercase or nil indicating if the codepoint or string has the property :other_lowercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_lowercase or nil. For a string, the result is :other_lowercase only if all codepoints in the string have the :other_lowercase property.

other_lowercase?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_lowercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_lowercase property.

other_math(codepoint)

Returns :other_math or nil indicating if the codepoint or string has the property :other_math.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_math or nil. For a string, the result is :other_math only if all codepoints in the string have the :other_math property.

other_math?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_math.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_math property.

other_uppercase(codepoint)

Returns :other_uppercase or nil indicating if the codepoint or string has the property :other_uppercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :other_uppercase or nil. For a string, the result is :other_uppercase only if all codepoints in the string have the :other_uppercase property.

other_uppercase?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :other_uppercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :other_uppercase property.

pattern_syntax(codepoint)

Returns :pattern_syntax or nil indicating if the codepoint or string has the property :pattern_syntax.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :pattern_syntax or nil. For a string, the result is :pattern_syntax only if all codepoints in the string have the :pattern_syntax property.

pattern_syntax?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :pattern_syntax.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :pattern_syntax property.

pattern_white_space(codepoint)

Returns :pattern_white_space or nil indicating if the codepoint or string has the property :pattern_white_space.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :pattern_white_space or nil. For a string, the result is :pattern_white_space only if all codepoints in the string have the :pattern_white_space property.

pattern_white_space?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :pattern_white_space.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :pattern_white_space property.

prepended_concatenation_mark(codepoint)

Returns :prepended_concatenation_mark or nil indicating if the codepoint or string has the property :prepended_concatenation_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :prepended_concatenation_mark or nil. For a string, the result is :prepended_concatenation_mark only if all codepoints in the string have the :prepended_concatenation_mark property.

prepended_concatenation_mark?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :prepended_concatenation_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :prepended_concatenation_mark property.

properties()

Returns the map of Unicode properties.

The property name is the map key and a list of codepoint ranges as tuples as the value.

Returns

  • A map of property names to a list of codepoint ranges.

Examples

iex> Unicode.Property.properties() |> Map.get(:alphabetic) |> Enum.take(2)
[{65, 90}, {97, 122}]

properties(codepoint)

@spec properties(string_or_codepoint()) :: [atom(), ...] | [[atom(), ...], ...]

Returns the property name(s) for the given binary or codepoint.

Arguments

  • codepoint is a single integer codepoint or a String.t/0.

Returns

  • In the case of a codepoint, a single list of the properties of that codepoint.

  • In the case of a binary, a list of property lists, one for each codepoint in the binary.

Examples

iex> Unicode.Property.properties(?A)
[
  :alphabetic,
  :ascii_hex_digit,
  :cased,
  :changes_when_casefolded,
  :changes_when_casemapped,
  :changes_when_lowercased,
  :grapheme_base,
  :hex_digit,
  :id_continue,
  :id_start,
  :uppercase,
  :xid_continue,
  :xid_start
]

quotation_mark(codepoint)

Returns :quotation_mark or nil indicating if the codepoint or string has the property :quotation_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :quotation_mark or nil. For a string, the result is :quotation_mark only if all codepoints in the string have the :quotation_mark property.

quotation_mark?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :quotation_mark.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :quotation_mark property.

radical(codepoint)

Returns :radical or nil indicating if the codepoint or string has the property :radical.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :radical or nil. For a string, the result is :radical only if all codepoints in the string have the :radical property.

radical?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :radical.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :radical property.

regional_indicator(codepoint)

Returns :regional_indicator or nil indicating if the codepoint or string has the property :regional_indicator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :regional_indicator or nil. For a string, the result is :regional_indicator only if all codepoints in the string have the :regional_indicator property.

regional_indicator?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :regional_indicator.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :regional_indicator property.

sentence_terminal(codepoint)

Returns :sentence_terminal or nil indicating if the codepoint or string has the property :sentence_terminal.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :sentence_terminal or nil. For a string, the result is :sentence_terminal only if all codepoints in the string have the :sentence_terminal property.

sentence_terminal?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :sentence_terminal.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :sentence_terminal property.

servers()

Returns a map of properties to the module that serves that property.

Returns

  • A map of property names to the module that serves that property.

Examples

iex> Unicode.Property.servers() |> Map.get("script")
Unicode.Script

soft_dotted(codepoint)

Returns :soft_dotted or nil indicating if the codepoint or string has the property :soft_dotted.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :soft_dotted or nil. For a string, the result is :soft_dotted only if all codepoints in the string have the :soft_dotted property.

soft_dotted?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :soft_dotted.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :soft_dotted property.

terminal_punctuation(codepoint)

Returns :terminal_punctuation or nil indicating if the codepoint or string has the property :terminal_punctuation.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :terminal_punctuation or nil. For a string, the result is :terminal_punctuation only if all codepoints in the string have the :terminal_punctuation property.

terminal_punctuation?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :terminal_punctuation.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :terminal_punctuation property.

unified_ideograph(codepoint)

Returns :unified_ideograph or nil indicating if the codepoint or string has the property :unified_ideograph.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :unified_ideograph or nil. For a string, the result is :unified_ideograph only if all codepoints in the string have the :unified_ideograph property.

unified_ideograph?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :unified_ideograph.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :unified_ideograph property.

uppercase(codepoint)

Returns :uppercase or nil indicating if the codepoint or string has the property :uppercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :uppercase or nil. For a string, the result is :uppercase only if all codepoints in the string have the :uppercase property.

uppercase?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :uppercase.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :uppercase property.

variation_selector(codepoint)

Returns :variation_selector or nil indicating if the codepoint or string has the property :variation_selector.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :variation_selector or nil. For a string, the result is :variation_selector only if all codepoints in the string have the :variation_selector property.

variation_selector?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :variation_selector.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :variation_selector property.

white_space(codepoint)

Returns :white_space or nil indicating if the codepoint or string has the property :white_space.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :white_space or nil. For a string, the result is :white_space only if all codepoints in the string have the :white_space property.

white_space?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :white_space.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :white_space property.

xid_continue(codepoint)

Returns :xid_continue or nil indicating if the codepoint or string has the property :xid_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :xid_continue or nil. For a string, the result is :xid_continue only if all codepoints in the string have the :xid_continue property.

xid_continue?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :xid_continue.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :xid_continue property.

xid_start(codepoint)

Returns :xid_start or nil indicating if the codepoint or string has the property :xid_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • :xid_start or nil. For a string, the result is :xid_start only if all codepoints in the string have the :xid_start property.

xid_start?(codepoint)

Returns a boolean indicating if the codepoint or string has the property :xid_start.

Arguments

  • codepoint_or_string is a single integer codepoint or a String.t/0.

Returns

  • true or false. For a string, the result is true only if all codepoints in the string have the :xid_start property.