30 lines
552 B
Text
30 lines
552 B
Text
// Unicode literals
|
|
auto str = "Hello regular string";
|
|
auto utf8 = u8"Hello utf-8 string";
|
|
auto utf16 = u"Hello utf-16 string";
|
|
auto utf32 = U"Hello utf-32 string";
|
|
|
|
// Wide-character strings
|
|
auto wide_char = L"Hello wchar_t string";
|
|
|
|
// Raw string literals (multiline)
|
|
auto char_multi = R"(Hello
|
|
"normal"
|
|
muliline
|
|
string.)";
|
|
auto utf8_multi = u8R"(Hello
|
|
"utf-8"
|
|
muliline
|
|
string)";
|
|
auto utf16_multi = uR"(Hello
|
|
"utf-16"
|
|
muliline
|
|
string)";
|
|
auto utf32_multi = UR"(Hello
|
|
"utf-32"
|
|
muliline
|
|
string)";
|
|
|
|
// Meta strings
|
|
#include <stdio>
|
|
#include "lib.h"
|