std::basic_string::empty

From Cppreference

Jump to: navigation, search
bool empty() const;

Checks if the string has no characters, i.e. whether begin() == end().

Contents

[edit] Parameters

(none)

[edit] Return value

true if the string is empty, false otherwise

[edit] Complexity

Constant

[edit] See also

size
returns the number of characters
(public member function)
length
returns the length of the string
(public member function)