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