====== Strings ===== ===== Character Types ===== * ''char'' * ''signed char'' * ''unsigned char'' * ''wchar_t'' (16bit on Windows, 32bit virtually everywhere else) * ''char16_t'' (C++11) * ''char32_t'' (C++11) ===== String Types ===== | std::string | std::basic_string | C++98 | | std::wstring | std::basic_string | C++98 | | std::u16string | std::basic_string | C++11 | | std::u32string | std::basic_string | C++11 | ===== Character Literals ===== * \n, \nn, \nnn -- octal value * \xnn... -- hexadecimal value (''char'', ''wchar_t'', ''char16_t'', ''char32_t'') * \unnnn -- Unicode BMP code point (no surrogate pairs) * \Unnnnnnnn -- Unicode code point (may map to more than one code unit) ===== String Literals ===== | ''""'' | ''const char[]'' | | C++98 | | ''L""'' | ''const wchar_t[]'' | | C++98 | | ''u8""'' | ''const char[]'' | UTF-8 | C++11 | | ''u""'' | ''const char16_t[]'' | UTF-16 | C++11 | | ''U""'' | ''const char32_t[]'' | UTF-32 | C++11 | Additionally, ''R"..."'' for "raw" literals.