std::basic_string
Template:cpp/string/basic string/sidebar
Defined in header <string>
|
||
template< class CharT, |
||
The class template basic_string
stores and manipulates sequences of char-like objects (that is, objects for which a specialization of std::char_traits or compatible traits class is provided).
The elements of a basic_string
are stored contiguously, that is, for a basic_string s
, &*(s.begin() + n) == &*s.begin() + n for any n in [0, s.size())
, or, equivalently, a pointer to s[0]
can be passed to functions that expect a pointer to the first element of a charT[]
array. (since C++11)
Several specializations for common character types are provided: Template:tdcl list begin Template:tdcl list header Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list item Template:tdcl list end
Contents |
Member types
Template:tdcl list begin Template:tdcl list hitem Template:tdcl list item Template:tdcl list item Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list template Template:tdcl list end
Member functions
Non-member functions
concatenates two strings or a string and a char (function template) | |
Input/output | |
performs stream I/O on strings (function template) | |
read data from an I/O stream into a string (function) | |
Numeric conversions |