📜  s.length() 和 s.size() 之间的差异是什么 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:45.362000             🧑  作者: Mango

代码示例1
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.