String

GC-free UTF-8 string type based on dlib.container.array. Stores up to 128 bytes without dynamic memory allocation, so short strings are processed very fast. String is always zero-terminated and directly compatible with C.

Constructors

this
this(string s)

Construct from D string

this
this(const(char)* cStr)

Construct from zero-terminated C string (ASCII or UTF8)

this
this(const(wchar)* wStr)

Construct from zero-terminated UTF-16 LE string

this
this(InputStream istrm)

Construct from an InputStream

Alias This

toString

Members

Functions

decode
auto decode()

Range interface that iterates the string by Unicode code point (dchar), i.e., foreach(dchar c; str.decode)

free
void free()
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(char c)
Undocumented in source. Be warned that the author may not have intended to support it.
opOpAssign
auto opOpAssign(String s)
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
void reserve(size_t amount)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

isDynamic
bool isDynamic [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
ptr
const(char)* ptr [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

data
Array!(char, 128) data;

Underlying array of characters

Meta