Functions | |
| static void | mayThrowStringConversionException () |
| String | fromByteString (const String &enc, const char *str, size_t len) |
| Converts a C string from the specified encoding into a String object using UTF-8 encoding. | |
| String | fromByteString (const String &enc, const std::string &str) |
| Converts a std::string from the specified encoding into a String object using UTF-8 encoding. | |
| String | fromWideString (const String &enc, const std::wstring &str) |
| Converts a std::wstring from the specified encoding into a String object using UTF-8 encoding. | |
| std::string | toByteString (const String &enc, const String &utf8) |
| Converts a UTF-8 String to the specified encoding casted as a (char based) std::string. | |
| std::wstring | toWideString (const String &enc, const String &utf8) |
| Convert a UTF-8 String to the specified encoding casted as a (wchar_t based) std::wstring. | |
| String BLOCXX_NAMESPACE::IConv::fromByteString | ( | const String & | enc, | |
| const std::string & | str | |||
| ) |
Converts a std::string from the specified encoding into a String object using UTF-8 encoding.
| enc | source encoding name | |
| str | source std::string |
| StringConversionException | if the conversion is not supported or incomplete or invalid character or multibyte sequence was found. |
Definition at line 185 of file IConv.cpp.
References BLOCXX_NAMESPACE::String::c_str().
| String BLOCXX_NAMESPACE::IConv::fromByteString | ( | const String & | enc, | |
| const char * | str, | |||
| size_t | len | |||
| ) |
Converts a C string from the specified encoding into a String object using UTF-8 encoding.
| enc | source encoding name | |
| str | source string pointer | |
| len | source string length |
| StringConversionException | if the conversion is not supported or incomplete or invalid character or multibyte sequence was found. |
Definition at line 150 of file IConv.cpp.
References BLOCXX_NAMESPACE::IConv_t::convert(), and mayThrowStringConversionException().
| String BLOCXX_NAMESPACE::IConv::fromWideString | ( | const String & | enc, | |
| const std::wstring & | str | |||
| ) |
Converts a std::wstring from the specified encoding into a String object using UTF-8 encoding.
| enc | source encoding name | |
| str | source std::wstring |
| StringConversionException | if the conversion is not supported or incomplete or invalid character or multibyte sequence was found. |
Definition at line 194 of file IConv.cpp.
References BLOCXX_NAMESPACE::IConv_t::convert(), and mayThrowStringConversionException().
| static void BLOCXX_NAMESPACE::IConv::mayThrowStringConversionException | ( | ) | [inline, static] |
Definition at line 128 of file IConv.cpp.
References BLOCXX_THROW.
Referenced by fromByteString(), fromWideString(), toByteString(), and toWideString().
| std::string BLOCXX_NAMESPACE::IConv::toByteString | ( | const String & | enc, | |
| const String & | utf8 | |||
| ) |
Converts a UTF-8 String to the specified encoding casted as a (char based) std::string.
| enc | encoding name | |
| utf8 | source UTF-8 encoded String |
| StringConversionException | if the conversion is not supported or incomplete or invalid character or multibyte sequence was found. |
Definition at line 229 of file IConv.cpp.
References BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::IConv_t::convert(), BLOCXX_NAMESPACE::String::empty(), BLOCXX_NAMESPACE::String::length(), and mayThrowStringConversionException().
| std::wstring BLOCXX_NAMESPACE::IConv::toWideString | ( | const String & | enc, | |
| const String & | utf8 | |||
| ) |
Convert a UTF-8 String to the specified encoding casted as a (wchar_t based) std::wstring.
| enc | encoding name | |
| utf8 | source UTF-8 encoded String |
| StringConversionException | if the conversion is not supported or incomplete or invalid character or multibyte sequence was found. |
Definition at line 264 of file IConv.cpp.
References BLOCXX_NAMESPACE::String::c_str(), BLOCXX_NAMESPACE::IConv_t::convert(), BLOCXX_NAMESPACE::String::empty(), BLOCXX_NAMESPACE::String::length(), and mayThrowStringConversionException().
1.5.6