#include <string>
Inheritance diagram for basic_string:
push_back
, at
, and array access are supported.
Definition at line 111 of file basic_string.h.
|
Default constructor creates an empty string. Definition at line 1964 of file basic_string.h. Referenced by basic_string< char >::substr(). |
|
Construct an empty string using allocator a. Definition at line 188 of file basic_string.tcc. |
|
Construct string with copy of value of str.
|
|
Construct string as copy of a substring.
|
|
Construct string as copy of a substring.
|
|
Construct string initialized by a character array.
|
|
Construct string as copy of a C string.
|
|
Construct string as multiple characters.
|
|
Construct string as copy of a range.
|
|
Destroy the string instance. Definition at line 414 of file basic_string.h. |
|
Append a range of characters.
|
|
Append multiple characters.
|
|
Append a C string.
|
|
Append a C substring.
References basic_string::capacity(), basic_string::reserve(), and basic_string::size(). |
|
Append a substring.
References basic_string::capacity(), basic_string::reserve(), and basic_string::size(). |
|
Append a string to this string.
References basic_string::capacity(), basic_string::reserve(), and basic_string::size(). Referenced by basic_string< char >::append(), collate::do_transform(), std::getline(), std::operator+(), basic_string< char >::operator+=(), std::operator>>(), and basic_string::resize(). |
|
Set value to a range of characters.
|
|
Set value to multiple characters.
|
|
Set value to contents of a C string.
|
|
Set value to a C substring.
References std::copy(), basic_string::max_size(), and basic_string::size(). |
|
Set value to a substring of a string.
|
|
Set value to contents of another string.
References basic_string::get_allocator(). Referenced by basic_string< char >::assign(), money_get::do_get(), and basic_string< char >::operator=(). |
|
Provides access to the data contained in the string.
|
|
Provides access to the data contained in the string.
|
|
Returns a read-only (constant) iterator that points to the first character in the string. Definition at line 464 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 453 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 1447 of file basic_string.h. Referenced by money_get::do_get(), and collate::do_transform(). |
|
Returns the total number of characters that the string can hold before needing to allocate more memory. Definition at line 569 of file basic_string.h. Referenced by basic_string::append(), and basic_string::reserve(). |
|
Erases the string, making it empty. Definition at line 595 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 924 of file basic_string.tcc. References std::min(). |
|
Compare substring to a C string.
References std::min(). |
|
Compare to a C string.
References std::min(), and basic_string::size(). |
|
Compare substring to a substring.
References basic_string::data(), and std::min(). |
|
Compare substring to a string.
References basic_string::data(), std::min(), and basic_string::size(). |
|
Compare to a string.
Referenced by std::operator!=(), std::operator<(), std::operator<=(), std::operator==(), std::operator>(), and std::operator>=(). |
|
Copy substring into C string.
References std::copy(). |
|
Return const pointer to 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 basic_string::compare(), basic_string< char >::compare(), money_get::do_get(), collate::do_transform(), basic_string< char >::find(), basic_string< char >::find_first_not_of(), basic_string< char >::find_first_of(), basic_string< char >::find_last_not_of(), basic_string< char >::find_last_of(), locale::operator()(), and basic_string< char >::rfind(). |
|
Returns true if the string is empty. Equivalent to *this == "". Definition at line 601 of file basic_string.h. |
|
Returns a read-only (constant) iterator that points one past the last character in the string. Definition at line 483 of file basic_string.h. |
|
Returns a read/write iterator that points one past the last character in the string. Unshares the string. Definition at line 472 of file basic_string.h. |
|
Remove a range of characters.
|
|
Remove one character.
|
|
Remove characters.
Referenced by std::getline(), std::operator>>(), and basic_string::resize(). |
|
Find position of a character.
References std::find(), basic_string::npos, and basic_string::size(). |
|
Find position of a C string.
|
|
Find position of a string.
|
|
Find position of a C substring.
References basic_string::npos, std::search(), and basic_string::size(). Referenced by basic_string< char >::find(), and basic_string< char >::find_first_of(). |
|
Find position of a different character.
References basic_string::npos, and basic_string::size(). |
|
Find position of a character not in C string.
|
|
Find position of a character not in C substring.
References std::find(), basic_string::npos, and basic_string::size(). |
|
Find position of a character not in string.
Referenced by basic_string< char >::find_first_not_of(). |
|
Find position of a character.
Note: equivalent to find(c, pos). Definition at line 1638 of file basic_string.h. |
|
Find position of a character of C string.
|
|
Find position of a character of C substring.
References std::find(), basic_string::npos, and basic_string::size(). |
|
Find position of a character of string.
Referenced by basic_string< char >::find_first_of(). |
|
Find last position of a different character.
References basic_string::npos, and basic_string::size(). |
|
Find position of a character not in C string.
|
|
Find last position of a character not in C substring.
References std::find(), basic_string::npos, and basic_string::size(). |
|
Find last position of a character not in string.
Referenced by basic_string< char >::find_last_not_of(). |
|
Find last position of a character.
Note: equivalent to rfind(c, pos). Definition at line 1699 of file basic_string.h. |
|
Find last position of a character of C string.
|
|
Find last position of a character of C substring.
References std::find(), basic_string::npos, and basic_string::size(). |
|
Find last position of a character of string.
Referenced by basic_string< char >::find_last_of(). |
|
Return copy of allocator used to construct this string. Definition at line 1462 of file basic_string.h. Referenced by basic_string::assign(), basic_string::reserve(), and basic_string::swap(). |
|
Insert one character.
|
|
Insert multiple characters.
|
|
Insert a C string.
|
|
Insert a C substring.
References std::copy(), basic_string::max_size(), and basic_string::size(). |
|
Insert a substring.
|
|
Insert value of a string.
|
|
Insert a range of characters.
|
|
Insert multiple characters.
Referenced by basic_string< char >::insert(). |
|
Returns the number of characters in the string, not including any null-termination. Definition at line 532 of file basic_string.h. Referenced by collate::do_transform(), and locale::operator()(). |
|
Returns the size() of the largest possible string. Definition at line 536 of file basic_string.h. Referenced by basic_string::assign(), std::getline(), basic_string::insert(), std::operator>>(), basic_string::replace(), basic_string::reserve(), and basic_string::resize(). |
|
Append a character.
|
|
Append a C string.
|
|
Append a string to this string.
|
|
Set value to string of length 1.
|
|
Copy contents of s into this string.
|
|
Assign the value of str to this string.
|
|
Subscript access to the data contained in the string.
|
|
Subscript access to the data contained in the string.
|
|
Append a single character.
Referenced by collate::do_transform(). |
|
Returns a read-only (constant) reverse iterator that points to the last character in the string. Iteration is done in reverse element order. Definition at line 501 of file basic_string.h. |
|
Returns a read/write reverse iterator that points to the last character in the string. Iteration is done in reverse element order. Unshares the string. Definition at line 492 of file basic_string.h. |
|
Returns a read-only (constant) reverse iterator that points to one before the first character in the string. Iteration is done in reverse element order. Definition at line 519 of file basic_string.h. |
|
Returns a read/write reverse iterator that points to one before the first character in the string. Iteration is done in reverse element order. Unshares the string. Definition at line 510 of file basic_string.h. |
|
Replace range of characters with range.
|
|
Replace range of characters with multiple characters.
|
|
Replace range of characters with C string.
|
|
Replace range of characters with C substring.
|
|
Replace range of characters with string.
|
|
Replace characters with multiple characters.
|
|
Replace characters with value of a C string.
|
|
Replace characters with value of a C substring.
References std::copy(), basic_string::max_size(), and basic_string::size(). |
|
Replace characters with value from another string.
|
|
Replace characters with value from another string.
Referenced by basic_string< char >::append(), basic_string< char >::assign(), basic_string< char >::insert(), and basic_string< char >::replace(). |
|
Attempt to preallocate enough memory for specified number of characters.
The advantage of this function is that if optimal code is a necessity and the user can determine the string length that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of string data. Definition at line 418 of file basic_string.tcc. References basic_string::capacity(), basic_string::get_allocator(), basic_string::max_size(), and basic_string::size(). Referenced by basic_string::append(), and std::operator+(). |
|
Resizes the string to the specified number of characters.
|
|
Resizes the string to the specified number of characters.
References basic_string::append(), basic_string::erase(), basic_string::max_size(), and basic_string::size(). |
|
Find last position of a character.
References basic_string::npos, and basic_string::size(). |
|
Find last position of a C string.
|
|
Find last position of a C substring.
References std::min(), basic_string::npos, and basic_string::size(). |
|
Find last position of a string.
Referenced by basic_string< char >::find_last_of(), and basic_string< char >::rfind(). |
|
|
Get a substring.
|
|
Swap contents with another string.
References basic_string::get_allocator(). |
|
Value returned by various member functions when they fail. Definition at line 70 of file basic_string.tcc. Referenced by basic_string::find(), basic_string::find_first_not_of(), basic_string::find_first_of(), basic_string::find_last_not_of(), basic_string::find_last_of(), and basic_string::rfind(). |