capacity(), reserve() | Returns the largest number of elements that could be stored in a string without increasing the memory allocation of the string. |
empty(), size() |
|
max_size() | maximum number of characters |
resize() | Specifies a new size for a string, appending or erasing elements as required. |
length() | Returns the current number of elements in a string. |
find(), rfind() | Searches a string in a forward/backward direction for the first occurrence of a substring that matches a specified sequence of characters. |
substr() | Copies a substring of at most some number of characters from a string beginning from a specified position. |
find_first_not_of() | Searches through a string for the first character that is not any element of a specified string. |
find_first_of() |
|
find_last_not_of() |
|
find_last_of() | . |
begin(),end() | Returns an iterator addressing the first element in the string. |
rbegin(), rend() |
|
clear() | Erases all elements of a string. |
insert(), erase() | Inserts an element or a number of elements or a range of elements into the string at a specified position. |
append(), push_back() | Adds characters to the end of a string. |
assign() | Assigns new character values to the contents of a string. |
replace() |
|
at() | a reference to the element at a specified location |
c_str(), data() |
|
compare() |
|
copy() | Copies at most a specified number of characters from an indexed position in a source string to a target character array.The function does not append a null character at the end of the copied content. |
get_allocator() | Returns a copy of the allocator object used to construct the string. |
swap() | Exchange the contents of two strings. |