Uses for the capacity value of a string

Posted by dreamlax on Stack Overflow See other posts from Stack Overflow or by dreamlax
Published on 2010-05-21T11:12:49Z Indexed on 2010/05/21 11:20 UTC
Read the original article Hit count: 213

Filed under:
|
|
|

In the C++ Standard Library, std::string has a public member function capacity() which returns the size of the internal allocated storage, a value greater than or equal to the number of characters in the string (according to here). What can this value be used for? Does it have something to do with custom allocators?

© Stack Overflow or respective owner

Related posts about c++

Related posts about string