size_type size() const;
size_type size() const noexcept;
12345678910
// string::size #include <iostream> #include <string> int main () { std::string str ("Test string"); std::cout << "The size of str is " << str.size() << " characters.\n"; return 0; }
The size of str is 11 characters