void reserve( size_type new_cap = 0 );
constexpr void reserve( size_type new_cap );
|(2)|| (since C++20)
1) Informs a
std::basic_stringobject of a planned change in size, so that it can manage the storage allocation appropriately.
If a capacity change takes place, all iterators and references, including the past-the-end iterator, are invalidated.
|new_cap||-||new capacity of the string|
 Return value
At most linear in the size() of the string
 See also
| returns the number of characters that can be held in currently allocated storage |
(public member function)