Skip to content

Commit e235279

Browse files
committed
Update example code style
1 parent 732d5e5 commit e235279

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ Tested on following compilers:
2828

2929
```cpp
3030
// यूनिकोड
31-
static char const _Src[] = "\xE0\xA4\xAF\xE0\xA5\x82\xE0\xA4\xA8\xE0\xA4\xBF\xE0\xA4\x95\xE0\xA5\x8B\xE0\xA4\xA1";
31+
static char const u8str_orig[] = "\xE0\xA4\xAF\xE0\xA5\x82\xE0\xA4\xA8\xE0\xA4\xBF\xE0\xA4\x95\xE0\xA5\x8B\xE0\xA4\xA1";
3232
using namespace ww898;
33-
std::u16string _Utf16;
34-
utf::convz<utf::utf8, utf::utf16>(_Src, std::back_inserter(_Utf16));
35-
std::u32string _Utf32;
36-
utf::conv<utf::utf16, utf::utf32>(_Utf16.begin(), _Utf16.end(), std::back_inserter(_Utf32));
37-
std::vector<char> _Utf8;
38-
utf::convz<utf::utf32, utf::utf8>(_Utf32.begin(), std::back_inserter(_Utf8));
33+
std::u16string u16str;
34+
utf::convz<utf::utf8, utf::utf16>(u8str_orig, std::back_inserter(u16str));
35+
std::u32string u32str;
36+
utf::conv<utf::utf16, utf::utf32>(u16str.begin(), u16str.end(), std::back_inserter(u32str));
37+
std::vector<char> u8str;
38+
utf::convz<utf::utf32, utf::utf8>(u32str.begin(), std::back_inserter(u8str));
3939
```
4040

4141
## Performance

0 commit comments

Comments
 (0)