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)
  2. typeof(this) opBinary(Rhs rhs)
    struct BasicString
    scope
    typeof(this)
    opBinary
    (
    string op
    Rhs
    )
    (
    scope auto ref const Rhs rhs
    )
    if (
    (
    op == "+" ||
    op == "~"
    )
    &&
    (
    isSomeChar!Rhs
    ||
    isSomeString!Rhs
    ||
    isCharArray!Rhs
    ||
    isIntegral!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