cppreference.com > C++ Strings
C++ Strings

Display all entries for C++ Strings on one page, or view entries individually:

String constructorscreate strings from arrays of characters and other strings
String operatorsconcatenate strings, assign strings, use strings for I/O, compare strings
appendappend characters and strings onto a string
assigngive a string values from strings of characters and other C++ strings
atreturns an element at a specific location
beginreturns an iterator to the beginning of the string
c_strreturns a standard C character array version of the string
capacityreturns the number of elements that the string can hold
clearremoves all elements from the string
comparecompares two strings
copycopies characters from a string into an array
datareturns a pointer to the first character of a string
emptytrue if the string has no elements
endreturns an iterator just past the last element of a string
eraseremoves elements from a string
findfind characters in the string
find_first_not_offind first absence of characters
find_first_offind first occurrence of characters
find_last_not_offind last absence of characters
find_last_offind last occurrence of characters
getlineread data from an I/O stream into a string
insertinsert characters into a string
lengthreturns the length of the string
max_sizereturns the maximum number of elements that the string can hold
push_backadd an element to the end of the string
rbeginreturns a reverse_iterator to the end of the string
rendreturns a reverse_iterator to the beginning of the string
replacereplace characters in the string
reservesets the minimum capacity of the string
resizechange the size of the string
rfindfind the last occurrence of a substring
sizereturns the number of items in the string
substrreturns a certain substring
swapswap the contents of this string with another