2

Possible Duplicate:
std::string length() and size() member functions

In my opinion size() and length() both mean the length of characters stored in the string.Is there anyting different with them.

4

1 回答 1

2

不,它们是相同的。参见 C++11、21.4.4/3:

size_type length() const noexcept;

回报:size()

于 2012-09-06T09:25:13.840 回答