nux-1.16.0
|
TCHAR to Unichar conversion. More...
#include <NuxCore/Character/NUnicode.h>
Public Member Functions | |
NUX_INLINE UNICHAR * | Convert (const TCHAR *Source) |
TCHAR to Unichar conversion.
Definition at line 262 of file NUnicode.h.
NUX_INLINE UNICHAR* nux::TCharToUnicharConvertion::Convert | ( | const TCHAR * | Source | ) | [inline] |
Convert from TCHAR to ANSICHAR
Source | String to convert. Null terminated. |
Definition at line 272 of file NUnicode.h.
References nux::AnsicharToUnicharConvertion::Convert().
{ // Determine whether we need to allocate memory or not #ifdef UNICODE size_t length = strlen (Source) + 1; size_t size = length * sizeof (UNICHAR); UNICHAR *Dest = new UNICHAR[size]; STRNCPY_S (Dest, size, Source, length); return Dest; #else AnsicharToUnicharConvertion convert; return convert.Convert (Source); #endif }