class
<string>
std::u32string
typedef basic_string<char32_t> u32string;
String of 32-bit characters
String class for 32-bit characters.
This is an instantiation of the basic_string class template that uses char32_t as the character type, with its default char_traits and allocator types (see basic_string for more info on the template).
Member functions
Note: The references to the members of its basic template (basic_string) are linked here.
- (constructor)
- Construct basic_string object (public member function
)
- (destructor)
- String destructor (public member function
)
- operator=
- String assignment (public member function
)
Iterators:
- begin
- Return iterator to beginning (public member function
)
- end
- Return iterator to end (public member function
)
- rbegin
- Return reverse iterator to reverse beginning (public member function
)
- rend
- Return reverse iterator to reverse end (public member function
)
- cbegin
- Return const_iterator to beginning (public member function
)
- cend
- Return const_iterator to end (public member function
)
- crbegin
- Return const_reverse_iterator to reverse beginning (public member function
)
- crend
- Return const_reverse_iterator to reverse end (public member function
)
Capacity:
- size
- Return size (public member function
)
- length
- Return length of string (public member function
)
- max_size
- Return maximum size (public member function
)
- resize
- Resize string (public member function
)
- capacity
- Return size of allocated storage (public member function
)
- reserve
- Request a change in capacity (public member function
)
- clear
- Clear string (public member function
)
- empty
- Test whether string is empty (public member function
)
- shrink_to_fit
- Shrink to fit (public member function
)
Element access:
- operator[]
- Get character of string (public member function
)
- at
- Get character of string (public member function
)
- back
- Access last character (public member function
)
- front
- Access first character (public member function
)
Modifiers:
- operator+=
- Append to string (public member function
)
- append
- Append to string (public member function
)
- push_back
- Append character to string (public member function
)
- assign
- Assign content to string (public member function
)
- insert
- Insert into string (public member function
)
- erase
- Erase characters from string (public member function
)
- replace
- Replace portion of string (public member function
)
- swap
- Swap string values (public member function
)
- pop_back
- Delete last character (public member function
)
String operations:
- c_str
- Get C-string equivalent
- data
- Get string data (public member function
)
- get_allocator
- Get allocator (public member function
)
- copy
- Copy sequence of characters from string (public member function
)
- find
- Find first occurrence in string (public member function
)
- rfind
- Find last occurrence in string (public member function
)
- find_first_of
- Find character in string (public member function
)
- find_last_of
- Find character in string from the end (public member function
)
- find_first_not_of
- Find non-matching character in string (public member function
)
- find_last_not_of
- Find non-matching character in string from the end (public member function
)
- substr
- Generate substring (public member function
)
- compare
- Compare strings (public member function
)
Member constants
Note: The references to the members of its basic template (basic_string) are linked here.
- npos
- Maximum value of size_type (public static member constant
)
Non-member functions overloads
Note: The references to the general overloads of its basic template (basic_string) are shown here.
- operator+
- Concatenate strings (function template
)
- relational operators
- Relational operators for basic_string (function template
)
- swap
- Exchanges the values of two strings (function template
)
- operator>>
- Extract string from stream (function template
)
- operator<<
- Insert string into stream (function template
)
- getline
- Get line from stream into string (function template
)