Function String.length

ulong length() pure nothrow @property @nogc @safe const;

Returns

The number of code units that are required to encode the string.