GString.opBinaryRight

A binary operator to allow appending with arbitrary strings.

  1. typeof(this) opBinaryRight(Grapheme g)
  2. typeof(this) opBinaryRight(R str)
    struct GString(CharT)
    typeof(this)
    opBinaryRight
    (
    string op : "~"
    R
    )
    (
    R str
    )
    if (
    isSomeString!R
    )
    if (
    isSomeChar!CharT
    )
  3. typeof(this) opBinaryRight(C ch)

Examples

auto t1 = typeof(this)("Test ");
auto t2 = t1 ~ "A";
assert(t2.rawString == "Test A");
auto t3 = t1 ~ "B"w;
assert(t3.rawString == "Test B");
auto t4 = t1 ~ "C"d;
assert(t4.rawString == "Test C");
auto t5 = "D"w ~ t1;
assert(t5.rawString == "DTest ");

Meta