Constructor
= operator
Comparisons operator overloads
Comparisons operator overloads
Returns an scope common string.
Hash implementation
= operator
SmallString!16 s16; assert(s16.empty); auto s8 = SmallString!8("Hellow!!"); assert(s8 == "Hellow!!", s8[]); s16 = s8; assert(s16 == "Hellow!!", s16[]); 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!!");