Table of contents
Namespace: Com\Tecnick\Unicode\Substitution
Final: Yes
File: Hangul.php line 48
Composes Hangul Jamo sequences into precomposed syllables, as defined by section 3.12 “Conjoining Jamo Behavior” of the Unicode standard. Both rules are applied left to right in a single pass:
Rule 1, L + V to an LV syllable: a leading consonant (choseong, U+1100 to U+1112) followed by a vowel (jungseong, U+1161 to U+1175) becomes S = SBase + (L - LBase) * NCount + (V - VBase) * TCount.
Rule 2, LV + T to an LVT syllable: an LV syllable, produced by rule 1 or already present in the input, followed by a trailing consonant (jongseong, U+11A8 to U+11C2) becomes S = LV + (T - TBase).
The other codepoints are returned unchanged.
Tags
- since: 2026-04-30
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2011-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-unicode
Methods
__construct()
File: Hangul.php line 60
public __construct(array<int, int> $ordarr) : mixed
Parameters
- $ordarr : array<int, int>: Array of Unicode codepoints.
getOrdarr()
File: Hangul.php line 71
public getOrdarr() : array<int, int>
Return values
array<int, int>