Table of contents
Namespace: Com\Tecnick\Unicode\Data
final class Hangul
Source: src/Data/Hangul.php:44
Algorithmic constants for the composition of Hangul Jamo into precomposed Hangul syllables, as defined in section 3.12 of the Unicode standard.
Precomposed syllables occupy the range U+AC00-U+D7A3 and are derived by:
S = SBase + (L - LBase) * NCount + (V - VBase) * TCount + (T - TBase)
where T = TBase means “no trailing consonant” (TBase itself is not a trailing consonant; the effective trailing index is 0 in that case).
Constants
LBASE
First Hangul leading consonant (choseong): U+1100 HANGUL CHOSEONG KIYEOK.
public const LBASE = 0x1100
Source: src/Data/Hangul.php:54
LCOUNT
Number of leading consonants (19).
Covers U+1100-U+1112.
public const LCOUNT = 19
Source: src/Data/Hangul.php:75
NCOUNT
Number of precomposed syllables per leading consonant.
NCount = VCount * TCount = 21 * 28 = 588.
public const NCOUNT = self::VCOUNT * self::TCOUNT
Source: src/Data/Hangul.php:97
SBASE
First precomposed Hangul syllable: U+AC00 HANGUL SYLLABLE GA.
public const SBASE = 0xac00
Source: src/Data/Hangul.php:49
SCOUNT
Total number of precomposed Hangul syllables.
SCount = LCount * NCount = 19 * 588 = 11172.
public const SCOUNT = self::LCOUNT * self::NCOUNT
Source: src/Data/Hangul.php:104
TBASE
Trailing consonant base value: U+11A7.
The first actual trailing consonant (jongseong) is U+11A8; TBase is one below that, so that (T - TBase) gives a 1-based index and a T of TBase itself encodes “no trailing consonant” (index 0).
public const TBASE = 0x11a7
Source: src/Data/Hangul.php:68
TCOUNT
Number of trailing consonant slots (28), including the “none” slot.
Effective trailing consonants: U+11A8-U+11C2 (27 codepoints). The 28th slot represents absence of a trailing consonant.
public const TCOUNT = 28
Source: src/Data/Hangul.php:90
VBASE
First Hangul vowel (jungseong): U+1161 HANGUL JUNGSEONG A.
public const VBASE = 0x1161
Source: src/Data/Hangul.php:59
VCOUNT
Number of vowels (21).
Covers U+1161-U+1175.
public const VCOUNT = 21
Source: src/Data/Hangul.php:82