Class used to pass a UTF-8, UTF-16, or UTF-32 string as a wide character (UTF-16/UTF-32) string.
More...
#include "nn/nlib/unicode/Convert.h"
Class used to pass a UTF-8, UTF-16, or UTF-32 string as a wide character (UTF-16/UTF-32) string.
- Description
- Because
operator const wchar_t*()
is defined, you can pass it to function arguments as a wide string. If the conversion fails and the object is invalid, an empty string is passed instead of a null pointer.
Definition at line 33 of file Convert.h.
§ ToWideObj() [1/2]
nn::nlib::unicode::ToWideObj::ToWideObj |
( |
const char * |
str | ) |
|
|
explicitnoexcept |
Converts a wide character string to a UTF-8 string.
- Parameters
-
[in] | str | UTF-8 string that to pass as a wide character (UTF-16/UTF-32) string. |
§ ToWideObj() [2/2]
nn::nlib::unicode::ToWideObj::ToWideObj |
( |
const wchar_t * |
wstr | ) |
|
|
inlineexplicitnoexcept |
Sets a wide character string.
- Parameters
-
[in] | wstr | Wide character string. |
- Description
- Stores the passed pointer in the object. Does not dynamically allocate memory or copy the string.
- Stores the converted wide character string internally in dynamically allocated memory. The object becomes invalid if the conversion fails.
Definition at line 36 of file Convert.h.
§ c_str()
nn::nlib::unicode::ToWideObj::c_str |
( |
| ) |
|
|
inlinenoexcept |
Explicitly returns a wide string.
- Returns
- C string converted to a wide character string.
Definition at line 42 of file Convert.h.
The documentation for this class was generated from the following files: