View source code
Display the source code in std/uni.d from which this page was generated on
github.
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.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.uni.compose
Try to canonically compose
2 .
Returns the composed if they do compose
and dchar.init otherwise.
The assumption is that
comes before first
in the original text,
usually meaning that the second
first
is a starter.
Prototype
dchar compose( dchar first, dchar second ) pure nothrow @trusted;
Note
Hangul syllables are not covered by this function.
See
below.
composeJamo
Example
assert(compose('A','\u0308') == '\u00C4'); assert(compose('A', 'B') == dchar.init); assert(compose('C', '\u0301') == '\u0106'); // note that the starter is the first one // thus the following doesn't compose assert(compose('\u0308', 'A') == dchar.init);
Authors
Dmitry Olshansky