# `Unicode.HangulSyllableType`
[🔗](https://github.com/elixir-unicode/unicode/blob/v2.2.0/lib/unicode/property/hangul_syllable_type.ex#L1)

Functions to introspect the Unicode `Hangul_Syllable_Type` property for binaries (Strings) and codepoints.

The `Hangul_Syllable_Type` property classifies Hangul jamo and precomposed syllables. The values are `:l` (Leading_Jamo), `:v` (Vowel_Jamo), `:t` (Trailing_Jamo), `:lv` (LV_Syllable) and `:lvt` (LVT_Syllable). Codepoints that are not Hangul have the value `:na` (Not_Applicable).

The primary API is `hangul_syllable_type/1` which returns the type of a codepoint, or the list of types of a string.

# `aliases`

Returns a map of aliases for Unicode hangul syllable types.

### Returns

* A map where the alias string is the key and the hangul syllable type is the value.

### Examples

    iex> Unicode.HangulSyllableType.aliases() |> Map.get("leadingjamo")
    :l

# `count`

Returns the count of the codepoints with a given hangul syllable type.

Aliases are resolved by this function.

### Arguments

* `hangul_syllable_type` is any type name or alias, as an atom or string.

### Returns

* A non-negative integer count of the codepoints with the hangul syllable type.

* `:error` if the hangul syllable type is not known.

### Examples

    iex> Unicode.HangulSyllableType.count(:lv)
    399

# `fetch`

Returns the Unicode codepoint ranges for a given hangul syllable type.

Aliases are resolved by this function.

### Arguments

* `hangul_syllable_type` is any type name or alias, as an atom or string.

### Returns

* `{:ok, range_list}` where `range_list` is a list of codepoint ranges as 2-tuples.

* `:error` if the hangul syllable type is not known.

### Examples

    iex> Unicode.HangulSyllableType.fetch(:lv) |> elem(0)
    :ok

    iex> Unicode.HangulSyllableType.fetch(:invalid)
    :error

# `get`

Returns the Unicode codepoint ranges for a given hangul syllable type.

Aliases are resolved by this function.

### Arguments

* `hangul_syllable_type` is any type name or alias, as an atom or string.

### Returns

* A list of codepoint ranges as 2-tuples.

* `nil` if the hangul syllable type is not known.

### Examples

    iex> Unicode.HangulSyllableType.get(:invalid)
    nil

# `hangul_syllable_type`

Returns the hangul syllable type of the given binary or codepoint.

### Arguments

* `string_or_codepoint` is either a binary (String) or a codepoint in the range `0..0x10FFFF`.

### Returns

* For a codepoint, a single type atom is returned. Non-Hangul codepoints return `:na`.

* For a binary, a list of the distinct types of the codepoints in the binary is returned.

### Examples

    iex> Unicode.HangulSyllableType.hangul_syllable_type(0xAC00)
    :lv

    iex> Unicode.HangulSyllableType.hangul_syllable_type(?A)
    :na

# `hangul_syllable_types`

Returns the map of Unicode hangul syllable types.

### Returns

* A map where the hangul syllable type is the key and a list of codepoint ranges as 2-tuples is the value.

### Examples

    iex> :lv in Map.keys(Unicode.HangulSyllableType.hangul_syllable_types())
    true

# `known_hangul_syllable_types`

Returns a list of known Unicode hangul syllable type names.

### Returns

* A list of atom hangul syllable type names.

### Examples

    iex> :lvt in Unicode.HangulSyllableType.known_hangul_syllable_types()
    true

---

*Consult [api-reference.md](api-reference.md) for complete listing*
