nux-1.16.0
nux::AnsiToTCharConversion Class Reference

ANSI to TCHAR conversion. More...

#include <NuxCore/Character/NUnicode.h>

List of all members.

Public Member Functions

NUX_INLINE TCHAR * Convert (const ANSICHAR *Source)

Detailed Description

ANSI to TCHAR conversion.

Definition at line 290 of file NUnicode.h.


Member Function Documentation

NUX_INLINE TCHAR* nux::AnsiToTCharConversion::Convert ( const ANSICHAR *  Source) [inline]

Convert from ANSICHAR to TCHAR

Parameters:
SourceString to convert. Null terminated.
Returns:
Return a pointer to the new string. Null terminated.

Definition at line 300 of file NUnicode.h.

References nux::AnsicharToUnicharConvertion::Convert().

    {
#ifdef UNICODE
      AnsicharToUnicharConvertion convert;
      return convert.Convert (Source);
#else
      size_t length = strlen (Source) + 1;
      size_t size = length;
      TCHAR *Dest = new TCHAR[size];
      STRNCPY_S (Dest, size, Source, length);
      return Dest;
#endif
    }

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends