STL‐compliant string conforming to the bslma::Allocator model.
Synopsis
Declared in <bslstl_string.h>
template<
class CHAR_TYPE,
class CHAR_TRAITS = char_traits<CHAR_TYPE>,
class ALLOCATOR = allocator<CHAR_TYPE>>
class basic_string;
Type Aliases
Name |
Description |
Alias for the (template parameter) |
|
Alias for a constant iterator over the characters of this string. |
|
Alias for a constant pointer to the character type. |
|
Alias for a non‐modifiable reference to the character type. |
|
These types satisfy the |
|
This |
|
Alias for an iterator over the characters of this string. |
|
Alias for a pointer to the character type. |
|
Alias for a modifiable reference to the character type. |
|
Alias for a reverse iterator over the characters of this string. |
|
Alias for the size type of this string. |
|
Alias for the (template parameter) |
|
Alias for the character type stored in this string. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this string object. |
Assignment operators |
|
|
|
Append characters from a range to this string. |
|
|
|
Assign characters from a range to this string. |
|
|
|
Return a reference to the last character of this string. |
|
|
|
Return a pointer to the null‐terminated character buffer. |
|
Return the capacity of this string, i.e., the maximum length for which resizing is guaranteed not to trigger a reallocation. |
|
Return an iterator providing non‐modifiable access to the first character of this string (or the past‐the‐end iterator if this string is empty). |
|
Return the past‐the‐end iterator for this string. |
|
Reset this string to an empty value. |
|
Lexicographically compare this string with another sequence. |
|
|
|
Copy characters from this string into a character buffer. |
|
Return a reverse iterator providing non‐modifiable access to the last character of this string (or the past‐the‐end reverse iterator if this string is empty). |
|
Return the past‐the‐end reverse iterator for this string. |
|
Return a pointer to the character buffer of this string. |
|
Return |
|
|
|
Return whether this string ends with the specified sequence. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the allocator used by this string to supply memory. |
|
|
|
Insert characters from a range into this string. |
|
Return the length of this string. |
|
Return the maximum possible length of this string. |
|
Addition assignment operators |
|
Return a reference to the character at the specified position. |
|
Erase the last character from this string. The behavior is undefined if this string is empty. |
|
Append the specified |
|
|
|
|
|
|
|
Replace a substring with characters from a range. |
|
Request that the capacity be at least the specified value. |
|
Change the length of this string. |
|
Resize this string and overwrite its contents. |
|
|
|
Request removal of unused capacity. |
|
Return the length of this string. |
|
|
|
|
|
Exchange the contents of two strings. |
|
Declare that |
|
|
Convert this string to a matching |
|
Convert this string to a platform |
Static Data Members
Name |
Description |
Value used to denote "not‐a‐position", guaranteed to be outside the range |
Deduction Guides
Name |
Description |
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
|
|
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
|
Deduce template arguments for |
Friends
Name |
Description |
Proctor that clears a string and restores it unless released. |
|
Convert a numeric value to a |
|
Convert a numeric value to a |
|
Convert a numeric value to a |
|
Convert a numeric value to a |
|
Convert a numeric value to a |
|
Convert a numeric value to a |
Non-Member Functions
Name |
Description |
Erase all occurrences of a character from a string. |
|
Erase all characters matching a predicate from a string. |
|
Return a hash value for the specified string. |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Return the concatenation of the specified operands. |
|
Return the concatenation of |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Same as the primary |
|
Perform a lexicographic three‐way comparison of two strings. |
|
Perform a lexicographic three‐way comparison of two strings. |
|
Perform a lexicographic three‐way comparison of two strings. |
|
Return whether two strings have the same value. |
|
Same as the two‐argument |
|
Same as the two‐argument |
|
Return a streamable object that quotes the specified |
|
Return a streamable object that quotes the specified |
|
Exchange the contents of two strings. |
|
|
Return the concatenation of the specified |
|
Return a |
|
Return the concatenation of the specified C string and string ref. |
|
Return the concatenation of the specified |
|
Return the concatenation of the specified |
|
Return the concatenation of the specified string ref and C string. |
|
Return the concatenation of the specified |
Created with MrDocs