The OpenD Programming Language

Grapheme.opIndexAssign

Writes a $(CODEPOINT) ch at given index in this cluster.

Warning: Use of this facility may invalidate grapheme cluster, see also Grapheme.valid.

struct Grapheme
@nogc nothrow pure @trusted
void
opIndexAssign
(
dchar ch
,
size_t index
)

Examples

auto g = Grapheme("A\u0302");
assert(g[0] == 'A');
assert(g.valid);
g[1] = '~'; // ASCII tilda is not a combining mark
assert(g[1] == '~');
assert(!g.valid);

Meta