public member function
bool empty() const noexcept;
Test whether string is empty
int main ()
std::cout << "Please introduce a text. Enter an empty line to finish:\n";
content += line + '\n';
} while (!line.empty());
std::cout << "The text you introduced was:\n" << content;
This program reads the user input line by line and stores it into string content until an empty line is introduced.
Unspecified, but generally constant.
The object is accessed.
No-throw guarantee: this member function never throws exceptions.