composeJamo

Try to compose hangul syllable out of a leading consonant (lead), a vowel and optional trailing consonant jamos.

On success returns the composed LV or LVT hangul syllable.

If any of lead and vowel are not a valid hangul jamo of the respective $(CHARACTER) class returns dchar.init.

version(!std_uni_bootstrap)
pure nothrow @nogc @safe
dchar
composeJamo
(
dchar lead
,
dchar vowel
,
dchar trailing = dchar.init
)

Examples

assert(composeJamo('\u1111', '\u1171', '\u11B6') == '\uD4DB');
// leaving out T-vowel, or passing any codepoint
// that is not trailing consonant composes an LV-syllable
assert(composeJamo('\u1111', '\u1171') == '\uD4CC');
assert(composeJamo('\u1111', '\u1171', ' ') == '\uD4CC');
assert(composeJamo('\u1111', 'A') == dchar.init);
assert(composeJamo('A', '\u1171') == dchar.init);

Meta