19.1. Introduction

The class template basic_string provides typical string-manipulation operations such as copying, searching, etc. The template definition and all support facilities are defined in namespace std; these include the typedef statement

typedef basic_string< char > string;

that creates the alias type string for basic_string<char>. A typedef is also provided for the wchar_t type (wstring). Type wchar_t1 stores characters (e.g., two-byte characters, four-byte characters, etc.) for supporting other character sets. We use string exclusively throughout this chapter. To use strings, include header <string>.

1. Type wchar_t commonly is used to represent Unicode®, but wchar_t’s size is not specified by the standard. C++11 also has types ...

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.