cpp/string/basic string/capacity

Returns the number of characters that the string has currently allocated space for.

Parameters
(none)

Return value
Capacity of the currently allocated storage, i.e. the storage available for storing elements.

Complexity
Constant.