Namespaces
Variants
Views
Actions

Strings library

From cppreference.com
< cpp
Revision as of 09:04, 28 March 2012 by P12 (Talk | contribs)

Template:cpp/string/sidebar

Contents

Null-terminated byte string management

Null-terminated multibyte string management

Null-terminated wide string management

basic_string

Defined in header <string>
template<

    class CharT,
    class Traits = std::char_traits<CharT>,
    class Allocator = std::allocator<CharT> >

> class basic_string;

The class basic_string generalizes the way how sequences of characters are manipulated and stored.

Several specializations of the class basic_string 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

char_traits

Strings library provides class template char_traits, defining types and functions for a character container. The following specializations are defined:

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <string>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
template<> class char_traits<std::string>;

template<> class char_traits<std::wstring>;
template<> class char_traits<std::u16string>;

template<> class char_traits<std::u32string>;
</td>

<td class="t-dcl-nopad"> </td> <td >

(since C++11)
(since C++11) </td> </tr> Template:ddcl list end