std::basic_string::size, std::basic_string::length - cppreference.com
[edit] Complexity Constant [edit] Notes For std::string, the elements are bytes (objects of type char), which are not the same as characters if a multibyte encoding such as UTF-8 is used. [edit] Example...