BasicString.length

Returns the length of the string, in terms of number of characters (utf code units).

This is the number of actual characters that conform the contents of the BasicString, which is not necessarily equal to its storage capacity.

struct BasicString
@property const scope pure nothrow @trusted @nogc
size_t
length
()

Examples

BasicString!char str = "123";
assert(str.length == 3);

BasicString!wchar wstr = "123";
assert(wstr.length == 3);

BasicString!dchar dstr = "123";
assert(dstr.length == 3);

Meta