- appendZeroTerminatedString
void appendZeroTerminatedString(const(char)* str)
Append a zero-terminated character to the string.
Name is explicit, because it should be rare and overload conflict.
- asSlice
inout(char)[] asSlice()
Converts to a D string, sliced into the String memory.
- length
size_t length()
Length in bytes of the string.
- makeEmpty
void makeEmpty()
Sets as empty/null string.
- opAssign
void opAssign(T x)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
void opAssign(T x)
Undocumented in source. Be warned that the author may not have intended to support it.
- opAssign
void opAssign(T x)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(const(char)[] s)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(const(String) str)
Undocumented in source. Be warned that the author may not have intended to support it.
- opOpAssign
void opOpAssign(char x)
Append a character to the string. This invalidates pointers to characters
returned before.
- opOpAssign
void opOpAssign(const(char)[] str)
Append a characters to the string.
- opOpAssign
void opOpAssign(const(String) str)
Append a characters to the string.
- opSlice
inout(char)[] opSlice()
- opSlice
inout(char)[] opSlice(size_t i1, size_t i2)
- ptr
inout(char)* ptr()
Pointer to first character in the string, or null.
For now, just a string builder that owns its memory. Dplug String, designed to ease the usage of all the C string function, allow appending, etc. String always owns its memory, and can return as a D slice. FUTURE: use realloc to be able to size down. Capacity to be a slice into existing memory and not own. Capacity to disown memory (implies: stop using Vec) QUESTION: should String just be a managed slice!T instead? Like Go slices.