Back to index

nux  3.0.0
Public Member Functions
nux::TCharToAnsiConvertion Class Reference

TCHAR to ANSI conversion. More...

#include <NUnicode.h>

List of all members.

Public Member Functions

NUX_INLINE TCharToAnsiConvertion ()
NUX_INLINE ANSICHARConvert (const TCHAR *Source)
 Convert from TCHAR to ANSICHAR.

Detailed Description

TCHAR to ANSI conversion.

Definition at line 234 of file NUnicode.h.

Constructor & Destructor Documentation

Definition at line 237 of file NUnicode.h.


Member Function Documentation

Convert from TCHAR to ANSICHAR.

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

Definition at line 244 of file NUnicode.h.

      // Determine whether we need to allocate memory or not
#ifdef UNICODE
      UnicharToAnsicharConvertion convert;
      return convert.Convert (Source);
      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;

Here is the call graph for this function:

The documentation for this class was generated from the following file: