BasicString.opBinary

Returns a newly constructed BasicString object with its value being the concatenation of the characters in this followed by those of rhs.

Parameter rhs can by type of BasicString!(...), char|wchar|dchar array/slice/character.

  1. typeof(this) opBinary(CharType[] rhs)
    struct BasicString
    scope
    typeof(this)
    opBinary
    (
    string op
    )
    (
    scope const CharType[] rhs
    )
    if (
    op == "+" ||
    op == "~"
    )
  2. typeof(this) opBinary(Rhs rhs)

Examples

BasicString!char str = null;
assert(str.empty);

str = str + '1';
assert(str == "1");

str = str + "23"d;
assert(str == "123");

str = str + BasicString!dchar("456");
assert(str == "123456");

Meta