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.
std.uni.Grapheme.opOpAssign
- multiple declarations
Function Grapheme.opOpAssign
Append character ch
to this grapheme.
ref auto opOpAssign(string op)
(
dchar ch
) @trusted;
Warning
Use of this facility may invalidate grapheme cluster,
see also valid
.
See Also
Example
import std .algorithm .comparison : equal;
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"));
Function Grapheme.opOpAssign
Append all characters from the input range inp
to this Grapheme.
ref auto opOpAssign(string op, Input)
(
scope Input inp
)
if (isInputRange!Input && is(ElementType!Input : dchar));
Authors
Dmitry Olshansky
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.