O'Reilly logo

C++ Standard Library Quick Reference by Marc Gregoire, Peter Van Weert

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Peter Van Weert and Marc Gregoire 2016
Peter Van Weert and Marc GregoireC++ Standard Library Quick Reference10.1007/978-1-4842-1876-1_6

6. Characters and Strings

Peter Van Weert and Marc Gregoire2
(1)
Kessel-Lo, Belgium
(2)
Meldert, Belgium
 

Strings    <string>

The Standard defines four different string types , each for a different char-like type:
 
String Type
Characters
Typical Character Size
Narrow strings
std::string
char
8 bit
Wide strings
std::wstring
wchar_t
16 or 32 bit
UTF-16 strings
std::u16string
char16_t
16 bit
UTF-32 strings
std::u32string
char32_t
32 bit
The names in the first column are purely indicative, because strings are completely agnostic about the character encoding used for the char-like items—or code units, as they are technically ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required