std::string 中 size() 和 length() 的区别

STL 中的 string 类有两个方法 size()length()用来返回字符串的长度。

两者在实现上没有区别:

 

 

 

发表评论