compose

Try to canonically compose 2 $(CHARACTERS). Returns the composed $(CHARACTER) if they do compose and dchar.init otherwise.

The assumption is that first comes before second in the original text, usually meaning that the first is a starter.

Note: Hangul syllables are not covered by this function. See composeJamo below.

version(!std_uni_bootstrap)
pure nothrow @safe
dchar
compose
(
dchar first
,
dchar second
)

Examples

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);

Meta