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.

std.uni.grapheme.op_op_assign - multiple declarations

Function Grapheme.opOpAssign

Append ch to this grapheme.

Prototype

ref opOpAssign(string op)(
  dchar ch
);

Warning

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

Example

auto g = Grapheme("A");
assert(g.valid);
g ~= '\u0301';
assert(g[].equal("A\u0301"));
assert(g.valid);
g ~= "B";
// not a valid grapheme cluster anymore
assert(!g.valid);
// still could be useful though
assert(g[].equal("A\u0301B"));

See Also

Grapheme.valid

Function Grapheme.opOpAssign

Append all from the input range inp to this Grapheme.

Prototype

ref opOpAssign(string op, Input)(
  Input inp
)
if (isInputRange!Input && is(ElementType!Input : dchar));

Authors

Dmitry Olshansky

License

Boost License 1.0.

Comments