User Tools

Site Tools


software:strings

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<char> C++98
std::wstring std::basic_string<wchar_t> C++98
std::u16string std::basic_string<char16_t> C++11
std::u32string std::basic_string<char32_t> 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“<delimiter>…<delimiter>” for “raw” literals.

software/strings.txt · Last modified: 2018/09/10 16:21 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki