Constructor
= operator
Comparisons operator overloads
Comparisons operator overloads
Returns an scope common string.
Returns a common scope string.
= operator
SmallString!16 s16; assert(s16.empty); auto s8 = SmallString!8("Hellow!!"); assert(s8 == "Hellow!!"); assert(s8[] == "Hellow!!"); assert(s8[0 .. $] == "Hellow!!"); assert(s8[1 .. 4] == "ell"); s16 = s8; assert(s16 == "Hellow!!"); s16[7] = '@'; s8 = null; assert(s8.empty); s8 = s16; assert(s8 == "Hellow!@"); auto s8_2 = s8; assert(s8_2 == "Hellow!@"); assert(s8_2 == s8); assert(s8 < "Hey"); assert(s8 > "Hellow!"); assert(s8.opCmp("Hey") < 0); assert(s8.opCmp(s8) == 0);
Concatenation
auto a = SmallString!16("asdf"); a ~= " "; auto b = a ~ "qwerty"; static assert(is(typeof(b) == SmallString!16)); assert(b == "asdf qwerty"); b.put('!'); b.put("!"); assert(b == "asdf qwerty!!");
Self-contained generic Small String implementaton.