RCString
- alias RCString = StringImpl!(char, RC.yes, Zero.no)
nothrow @nogc
alias RCString =
StringImpl!(
char,
RC.yes,
Zero.no)
- alias RCWString = StringImpl!(wchar, RC.yes, Zero.no)
- alias RCDString = StringImpl!(dchar, RC.yes, Zero.no)
- alias RCStringZ = StringImpl!(char, RC.yes, Zero.yes)
- alias RCWStringZ = StringImpl!(wchar, RC.yes, Zero.yes)
- alias RCDStringZ = StringImpl!(dchar, RC.yes, Zero.yes)
bc string string
aliasesfunctionsstructstemplates
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.