#include <string>
Inheritance diagram for std::basic_string< CharT, Traits, Alloc >:

Public Member Functions | |
| basic_string () | |
| Default constructor creates an empty string. | |
| basic_string (const Alloc &a) | |
| Construct an empty string using allocator a. | |
| basic_string (const basic_string &str) | |
| Construct string with copy of value of str. | |
| basic_string (const basic_string &str, size_type position, size_type n=npos) | |
| Construct string as copy of a substring. | |
| basic_string (const basic_string &str, size_type position, size_type n, const Alloc &a) | |
| Construct string as copy of a substring. | |
| basic_string (const CharT *s, size_type n, const Alloc &a=Alloc()) | |
| Construct string initialized by a character array. | |
| basic_string (const CharT *s, const Alloc &a=Alloc()) | |
| Construct string as copy of a C string. | |
| basic_string (size_type n, CharT c, const Alloc &a=Alloc()) | |
| Construct string as multiple characters. | |
| template<class InputIterator> | |
| basic_string (InputIterator __beg, InputIterator __end, const Alloc &a=Alloc()) | |
| Construct string as copy of a range. | |
| ~basic_string () | |
| Destroy the string instance. | |
| basic_string & | operator= (const basic_string &str) |
| Assign the value of str to this string. | |
| basic_string & | operator= (const CharT *s) |
| Copy contents of s into this string. | |
| basic_string & | operator= (CharT c) |
| Set value to string of length 1. | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| const_reverse_iterator | rbegin () const |
| reverse_iterator | rend () |
| const_reverse_iterator | rend () const |
| size_type | size () const |
| null-termination. | |
| size_type | length () const |
| null-termination. | |
| size_type | max_size () const |
| Returns the size() of the largest possible string. | |
| void | resize (size_type n, CharT c) |
| Resizes the string to the specified number of characters. | |
| void | resize (size_type n) |
| Resizes the string to the specified number of characters. | |
| size_type | capacity () const |
| void | reserve (size_type __res_arg=0) |
| Attempt to preallocate enough memory for specified number of characters. | |
| void | clear () |
| bool | empty () const |
| const_reference | operator[] (size_type position) const |
| Subscript access to the data contained in the string. | |
| reference | operator[] (size_type position) |
| Subscript access to the data contained in the string. | |
| const_reference | at (size_type n) const |
| Provides access to the data contained in the string. | |
| reference | at (size_type n) |
| Provides access to the data contained in the string. | |
| basic_string & | operator+= (const basic_string &str) |
| Append a string to this string. | |
| basic_string & | operator+= (const CharT *s) |
| Append a C string. | |
| basic_string & | operator+= (CharT c) |
| Append a character. | |
| basic_string & | append (const basic_string &str) |
| Append a string to this string. | |
| basic_string & | append (const basic_string &str, size_type position, size_type n) |
| Append a substring. | |
| basic_string & | append (const CharT *s, size_type n) |
| Append a C substring. | |
| basic_string & | append (const CharT *s) |
| Append a C string. | |
| basic_string & | append (size_type n, CharT c) |
| Append multiple characters. | |
| template<class InputIterator> | |
| basic_string & | append (InputIterator first, InputIterator last) |
| Append a range of characters. | |
| void | push_back (CharT c) |
| Append a single character. | |
| basic_string & | assign (const basic_string &str) |
| Set value to contents of another string. | |
| basic_string & | assign (const basic_string &str, size_type position, size_type n) |
| Set value to a substring of a string. | |
| basic_string & | assign (const CharT *s, size_type n) |
| Set value to a C substring. | |
| basic_string & | assign (const CharT *s) |
| Set value to contents of a C string. | |
| basic_string & | assign (size_type n, CharT c) |
| Set value to multiple characters. | |
| template<class InputIterator> | |
| basic_string & | assign (InputIterator first, InputIterator last) |
| Set value to a range of characters. | |
| void | insert (iterator __p, size_type n, CharT c) |
| Insert multiple characters. | |
| template<class InputIterator> | |
| void | insert (iterator __p, InputIterator __beg, InputIterator __end) |
| Insert a range of characters. | |
| basic_string & | insert (size_type position1, const basic_string &str) |
| Insert value of a string. | |
| basic_string & | insert (size_type position1, const basic_string &str, size_type position2, size_type n) |
| Insert a substring. | |
| basic_string & | insert (size_type position, const CharT *s, size_type n) |
| Insert a C substring. | |
| basic_string & | insert (size_type position, const CharT *s) |
| Insert a C string. | |
| basic_string & | insert (size_type position, size_type n, CharT c) |
| Insert multiple characters. | |
| iterator | insert (iterator __p, CharT c) |
| Insert one character. | |
| basic_string & | erase (size_type position=0, size_type n=npos) |
| Remove characters. | |
| iterator | erase (iterator position) |
| Remove one character. | |
| iterator | erase (iterator first, iterator last) |
| Remove a range of characters. | |
| basic_string & | replace (size_type position, size_type n, const basic_string &str) |
| Replace characters with value from another string. | |
| basic_string & | replace (size_type position1, size_type n1, const basic_string &str, size_type position2, size_type n2) |
| Replace characters with value from another string. | |
| basic_string & | replace (size_type position, size_type n1, const CharT *s, size_type n2) |
| Replace characters with value of a C substring. | |
| basic_string & | replace (size_type position, size_type n1, const CharT *s) |
| Replace characters with value of a C string. | |
| basic_string & | replace (size_type position, size_type n1, size_type n2, CharT c) |
| Replace characters with multiple characters. | |
| basic_string & | replace (iterator __i1, iterator __i2, const basic_string &str) |
| Replace range of characters with string. | |
| basic_string & | replace (iterator __i1, iterator __i2, const CharT *s, size_type n) |
| Replace range of characters with C substring. | |
| basic_string & | replace (iterator __i1, iterator __i2, const CharT *s) |
| Replace range of characters with C string. | |
| basic_string & | replace (iterator __i1, iterator __i2, size_type n, CharT c) |
| Replace range of characters with multiple characters. | |
| template<class InputIterator> | |
| basic_string & | replace (iterator __i1, iterator __i2, InputIterator __k1, InputIterator __k2) |
| Replace range of characters with range. | |
| size_type | copy (CharT *s, size_type n, size_type position=0) const |
| Copy substring into C string. | |
| void | swap (basic_string &s) |
| Swap contents with another string. | |
| const CharT * | c_str () const |
| Return const pointer to null-terminated contents. | |
| const CharT * | data () const |
| Return const pointer to contents. | |
| allocator_type | get_allocator () const |
| Return copy of allocator used to construct this string. | |
| size_type | find (const CharT *s, size_type position, size_type n) const |
| Find position of a C substring. | |
| size_type | find (const basic_string &str, size_type position=0) const |
| Find position of a string. | |
| size_type | find (const CharT *s, size_type position=0) const |
| Find position of a C string. | |
| size_type | find (CharT c, size_type position=0) const |
| Find position of a character. | |
| size_type | rfind (const basic_string &str, size_type position=npos) const |
| Find last position of a string. | |
| size_type | rfind (const CharT *s, size_type position, size_type n) const |
| Find last position of a C substring. | |
| size_type | rfind (const CharT *s, size_type position=npos) const |
| Find last position of a C string. | |
| size_type | rfind (CharT c, size_type position=npos) const |
| Find last position of a character. | |
| size_type | find_first_of (const basic_string &str, size_type position=0) const |
| Find position of a character of string. | |
| size_type | find_first_of (const CharT *s, size_type position, size_type n) const |
| Find position of a character of C substring. | |
| size_type | find_first_of (const CharT *s, size_type position=0) const |
| Find position of a character of C string. | |
| size_type | find_first_of (CharT c, size_type position=0) const |
| Find position of a character. | |
| size_type | find_last_of (const basic_string &str, size_type position=npos) const |
| Find last position of a character of string. | |
| size_type | find_last_of (const CharT *s, size_type position, size_type n) const |
| Find last position of a character of C substring. | |
| size_type | find_last_of (const CharT *s, size_type position=npos) const |
| Find last position of a character of C string. | |
| size_type | find_last_of (CharT c, size_type position=npos) const |
| Find last position of a character. | |
| size_type | find_first_not_of (const basic_string &str, size_type position=0) const |
| Find position of a character not in string. | |
| size_type | find_first_not_of (const CharT *s, size_type position, size_type n) const |
| Find position of a character not in C substring. | |
| size_type | find_first_not_of (const CharT *s, size_type position=0) const |
| Find position of a character not in C string. | |
| size_type | find_first_not_of (CharT c, size_type position=0) const |
| Find position of a different character. | |
| size_type | find_last_not_of (const basic_string &str, size_type position=npos) const |
| Find last position of a character not in string. | |
| size_type | find_last_not_of (const CharT *s, size_type position, size_type n) const |
| Find last position of a character not in C substring. | |
| size_type | find_last_not_of (const CharT *s, size_type position=npos) const |
| Find position of a character not in C string. | |
| size_type | find_last_not_of (CharT c, size_type position=npos) const |
| Find last position of a different character. | |
| basic_string | substr (size_type position=0, size_type n=npos) const |
| Get a substring. | |
| int | compare (const basic_string &str) const |
| Compare to a string. | |
| int | compare (size_type position, size_type n, const basic_string &str) const |
| Compare substring to a string. | |
| int | compare (size_type position1, size_type n1, const basic_string &str, size_type position2, size_type n2) const |
| Compare substring to a substring. | |
| int | compare (const CharT *s) const |
| Compare to a C string. | |
| int | compare (size_type position, size_type n1, const CharT *s) const |
| Compare substring to a C string. | |
| int | compare (size_type position, size_type n1, const CharT *s, size_type n2) const |
| Compare substring against a character array. | |
Meets the requirements of a container, a reversible container, and a sequence. Of the optional sequence requirements, only push_back, at, and array access are supported.
Definition at line 110 of file basic_string.h.
|
|||||||||
|
Default constructor creates an empty string.
Definition at line 1972 of file basic_string.h. Referenced by std::basic_string< char >::substr(). |
|
||||||||||
|
Construct an empty string using allocator a.
Definition at line 192 of file basic_string.tcc. |
|
||||||||||
|
Construct string with copy of value of str.
Definition at line 184 of file basic_string.tcc. |
|
||||||||||||||||||||
|
Construct string as copy of a substring.
Definition at line 198 of file basic_string.tcc. |
|
||||||||||||||||||||||||
|
Construct string as copy of a substring.
Definition at line 208 of file basic_string.tcc. |
|
||||||||||||||||||||
|
Construct string initialized by a character array.
Definition at line 220 of file basic_string.tcc. |
|
||||||||||||||||
|
Construct string as copy of a C string.
Definition at line 227 of file basic_string.tcc. |
|
||||||||||||||||||||
|
Construct string as multiple characters.
Definition at line 234 of file basic_string.tcc. |
|
||||||||||||||||||||||||
|
Construct string as copy of a range.
Definition at line 242 of file basic_string.tcc. |
|
|||||||||
|
Destroy the string instance.
Definition at line 417 of file basic_string.h. |
|
||||||||||||||||||||
|
Append a range of characters.
Definition at line 777 of file basic_string.h. |
|
||||||||||||||||
|
Append multiple characters.
Definition at line 764 of file basic_string.h. |
|
||||||||||
|
Append a C string.
Definition at line 749 of file basic_string.h. |
|
||||||||||||||||
|
Append a C substring.
Definition at line 636 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::reserve(), and std::basic_string< CharT, Traits, Alloc >::size(). |
|
||||||||||||||||||||
|
Append a substring.
Definition at line 619 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::reserve(), and std::basic_string< CharT, Traits, Alloc >::size(). |
|
||||||||||
|
Append a string to this string.
Definition at line 603 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::reserve(), and std::basic_string< CharT, Traits, Alloc >::size(). Referenced by std::basic_string< char >::append(), std::collate< CharT >::do_transform(), std::getline(), std::operator+(), std::basic_string< char >::operator+=(), std::operator>>(), and std::basic_string< CharT, Traits, Alloc >::resize(). |
|
||||||||||||||||||||
|
Set value to a range of characters.
Definition at line 866 of file basic_string.h. |
|
||||||||||||||||
|
Set value to multiple characters.
Definition at line 853 of file basic_string.h. |
|
||||||||||
|
Set value to contents of a C string.
Definition at line 837 of file basic_string.h. |
|
||||||||||||||||
|
Set value to a C substring.
Definition at line 265 of file basic_string.tcc. |
|
||||||||||||||||||||
|
Set value to a substring of a string.
Definition at line 809 of file basic_string.h. |
|
||||||||||
|
Set value to contents of another string.
Definition at line 249 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::get_allocator(). Referenced by std::basic_string< char >::assign(), std::money_get< CharT, InIter >::do_get(), and std::basic_string< char >::operator=(). |
|
||||||||||
|
Provides access to the data contained in the string.
Definition at line 678 of file basic_string.h. |
|
||||||||||
|
Provides access to the data contained in the string.
Definition at line 659 of file basic_string.h. |
|
|||||||||
|
Returns a read-only (constant) iterator that points to the first character in the string. Definition at line 473 of file basic_string.h. |
|
|||||||||
|
Returns a read/write iterator that points to the first character in the string. Unshares the string. Definition at line 462 of file basic_string.h. |
|
|||||||||
|
Return const pointer to null-terminated contents. This is a handle to internal data. Do not modify or dire things may happen. Definition at line 1456 of file basic_string.h. Referenced by std::collate< CharT >::do_compare(), std::money_get< CharT, InIter >::do_get(), std::collate< CharT >::do_transform(), and std::locale::locale(). |
|
|||||||||
|
Returns the total number of characters that the string can hold before needing to allocate more memory. Definition at line 578 of file basic_string.h. |
|
|||||||||
|
Erases the string, making it empty. Definition at line 604 of file basic_string.h. |
|
||||||||||||||||||||||||
|
Compare substring against a character array.
NB: s must have at least n2 characters, '' has no special meaning. Definition at line 926 of file basic_string.tcc. References std::min(). |
|
||||||||||||||||||||
|
Compare substring to a C string.
Definition at line 910 of file basic_string.tcc. References std::min(). |
|
||||||||||
|
Compare to a C string.
Definition at line 895 of file basic_string.tcc. References std::min(), and std::basic_string< CharT, Traits, Alloc >::size(). |
|
||||||||||||||||||||||||||||
|
Compare substring to a substring.
Definition at line 877 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::data(), and std::min(). |
|
||||||||||||||||||||
|
Compare substring to a string.
Definition at line 862 of file basic_string.tcc. References std::basic_string< CharT, Traits, Alloc >::data(), std::min(), and std::basic_string< CharT, Traits, Alloc >::size(). |
|
||||||||||
|
Compare to a string.
Definition at line 1858 of file basic_string.h. Referenced by std::operator!=(), std::operator<(), std::operator<=(), std::operator==(), std::operator>(), and std::operator>=(). |
|
||||||||||||||||||||
|
Copy substring into C string.
Definition at line 678 of file basic_string.tcc. |
|
|||||||||