C++ String built-in functions

String built-in functions: Capacity s.size() -> returns the size of the string. s.max_size() -> returns the maximum size that string can hold. s.capacity() -> returns current available capacity of the string. s.clear() -> clear the string. s.empty() -> return true/false if the string is empty. s.resize() -> change the size of the string. Element access S[i] -> access the ith index of the string. s.at(i) -> access the ith index of the string. s.back() -> access the last element of the string. s.front() -> access the first element of the string. Modifiers s+= -> append another string. s.append() -> append another string. s.push_back() -> add character to the last of the string. s.pop_back() -> remove the last character of the string. s= -> assign string. s.assign() -> assign string. s.erase() -> erase characters from the string. s.replace() -> replace a portion of the string. s.insert() -> insert a portion to a specific position. Iterators s.begin() -> pointer to the first element. s.end() -> pointer to the next element after the last element of the string.
