RCWString

Refcounted string implementation.

It uses malloc for string buffer.

Types with RC prefix are reference counted, so they can be moved around freely. Types without RC prefix has disabled copy constructor and can be only moved (passing ownership) or cloned.

There are wariants with W and D before String that corresponds to payloads wchar and dchar as usual.

Types that ends with Z means that they internally manages trailing '\0' and so can be safely used with C interop.

NOTE: Beware of using exposed data pointer stored before some more content is added to RCString as internal buffer can be reallocated / resized if needed.

Meta