Answer the question
In order to leave comments, you need to log in
Does the size() method of the std::string class return the entire length of the string?
For example:
std::string line="abc";
int size=line.size(); // size == 3
// 'a' - 1 'b' - 2 'c' - 3
Answer the question
In order to leave comments, you need to log in
std::string does not use the null character to store the terminator.
This, in particular, means that arbitrary data, including zeros, can be placed in std::string.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question