|
Samchon Framework for CPP
1.0.0
|
A utility class supporting conversion between multiple character-sets. More...
#include <Charset.hpp>
Static Public Member Functions | |
| static auto | toMultibyte (const std::string &source) -> std::string |
| Convert utf-8 to multibyte. More... | |
| static auto | toMultibyte (const std::wstring &source) -> std::string |
| Convert unicode to multibyte. More... | |
| static auto | toUTF8 (const std::string &source) -> std::string |
| Convert multibyte to utf-8. More... | |
| static auto | toUTF8 (const std::wstring &source) -> std::string |
| Convert unicode to utf-8. More... | |
| static auto | toUnicode (const std::string &source, int charset) -> std::wstring |
| Convert multibyte or utf-8 to unicode. More... | |
A utility class supporting conversion between multiple character-sets.
Charset class, it's easier to think iconv in linux
Supported character-sets
Definition at line 35 of file Charset.hpp.
|
inlinestatic |
Convert utf-8 to multibyte.
Converts utf-8 string to multibyte string.
If the utf-8 string has header int the front, it will be erased.
| str | A utf-8 string would be converted to multibyte |
Definition at line 56 of file Charset.hpp.
References toUnicode().

|
inlinestatic |
Convert unicode to multibyte.
Converts unicode string to multibyte string
If the unicode string has header in the front, it will be erased
| str | A unicode string to be converted |
Definition at line 76 of file Charset.hpp.
|
inlinestatic |
Convert multibyte to utf-8.
Converts multibyte string to utf-8 string
If the inputted string is not multibyte, then may cause breakage on letters
| str | A multibyte string would be converted |
Definition at line 122 of file Charset.hpp.
References toUnicode().

|
inlinestatic |
Convert unicode to utf-8.
Converts unicode string to utf-8 string
Generated utf-8 string follows unicode string wheter to have header or not
| str | A unicode string would be converted |
Definition at line 145 of file Charset.hpp.
|
inlinestatic |
Convert multibyte or utf-8 to unicode.
| str | A multibyte or utf-8 string would be converted |
| Designate | str is multibyte or utf-8 string |
Definition at line 166 of file Charset.hpp.
Referenced by toMultibyte(), and toUTF8().
