String.empty

Returns whether the string is empty.

struct String
@property const @nogc nothrow pure @safe
bool
empty
()

Return Value

Type: bool

$(D_KEYWORD true) if the string is empty, $(D_KEYWORD false) otherwise.

Examples

String s;
assert(s.empty);

s.insertBack('K');
assert(!s.empty);

Meta