Length
std::string::length
Opis
size_t length() const;
Pozwala sprawdzić, ile aktualnie dany string przechowuje znaków.
Działa identycznie jak size.
Zwraca
Przykład
#include <iostream> #include <string> int main() { using namespace std; string foo("XXX"); cout << foo.length() << endl; // 3 }
Zobacz też: