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