View source code
Display the source code in std/uni.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Function std.uni.composeJamo
Try to compose hangul syllable out of a leading consonant (lead
),
a vowel
and optional trailing
consonant jamos.
dchar composeJamo
(
dchar lead,
dchar vowel,
dchar trailing = '\uffff'
) pure nothrow @nogc @safe;
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.
Example
writeln(composeJamo('\u1111', '\u1171', '\u11B6')); // '\uD4DB'
// leaving out T-vowel, or passing any codepoint
// that is not trailing consonant composes an LV-syllable
writeln(composeJamo('\u1111', '\u1171')); // '\uD4CC'
writeln(composeJamo('\u1111', '\u1171', ' ')); // '\uD4CC'
writeln(composeJamo('\u1111', 'A')); // dchar.init
writeln(composeJamo('A', '\u1171')); // dchar.init
Authors
Dmitry Olshansky
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.