Answers for "what is difffrence between s.length() and s.size()"

C++
1

what is difffrence between s.length() and s.size()

The size() function is consistent with other STL containers 
(like vector, map, etc.) and length() is consistent with most 
peoples intuitive notion of character strings like a word, sentence
or paragraph. We say a paragraph'ss length not its size, so length() 
is to make things more readable.
Posted by: Guest on June-18-2020

Code answers related to "what is difffrence between s.length() and s.size()"

Browse Popular Code Answers by Language