append
alias Str = UniqueString!false; assert(Str(`a`).append('b', 'c')[] == `abc`); assert(Str(`a`).append(`b`, `c`)[] == `abc`); const Str x = Str(`a`).append('b', 'c'); // is moved assert(x[] == `abc`); Str y = `x`; Str z = y.append('y', 'z', `w`); // needs dup assert(y.ptr != z.ptr); assert(z[] == `xyzw`);
Return data appended with arguments args.
If data is an r-value it's modified and returned, otherwise a copy is made and returned.