Core Library
Classes | Namespaces | Defines | Functions
AnsiWide.hpp File Reference

Ansi/Wide string conversion functions. More...

Classes

class  Core::AnsiToWide
 The class used to do the conversion from ANSI to Wide via the X2Y() macros. More...
class  Core::WideToAnsi
 The class used to do the conversion from Wide to ANSI via the X2Y() macros. More...

Namespaces

namespace  Core
 

The Core Library namespace.


Defines

#define A2W(psz)   static_cast<const wchar_t*>(Core::AnsiToWide(psz))
 Convert an ANSI string to Wide.
#define W2A(psz)   static_cast<const char*>(Core::WideToAnsi(psz))
 Convert a Wide string to ANSI.
#define A2T(psz)   A2W(psz)
 Convert an ANSI string to a TCHAR string.
#define T2A(psz)   W2A(psz)
 Convert a TCHAR string to ANSI.
#define W2T(psz)   (psz)
 Convert a Wide string to a TCHAR string.
#define T2W(psz)   (psz)
 Convert a TCHAR string to Wide.

Functions

void Core::ansiToWide (const char *pszBegin, const char *pszEnd, wchar_t *pszDst)
 Convert a string from ANSI to Wide.
std::wstring Core::ansiToWide (const char *pszBegin, const char *pszEnd)
 Convert a string from ANSI to Wide.
std::wstring Core::ansiToWide (const char *psz)
 Convert a string from ANSI to Wide.
std::wstring Core::ansiToWide (const std::string &str)
 Convert a string from ANSI to Wide.
void Core::wideToAnsi (const wchar_t *pszBegin, const wchar_t *pszEnd, char *pszDst)
 Convert a string from Wide to ANSI.
std::string Core::wideToAnsi (const wchar_t *pszBegin, const wchar_t *pszEnd)
 Convert a string from Wide to ANSI.
std::string Core::wideToAnsi (const wchar_t *psz)
 Convert a string from Wide to ANSI.
std::string Core::wideToAnsi (const std::wstring &str)
 Convert a string from Wide to ANSI.

Detailed Description

Ansi/Wide string conversion functions.

Author:
Chris Oldwood

Define Documentation

#define A2W (   psz)    static_cast<const wchar_t*>(Core::AnsiToWide(psz))

Convert an ANSI string to Wide.

#define W2A (   psz)    static_cast<const char*>(Core::WideToAnsi(psz))

Convert a Wide string to ANSI.

#define A2T (   psz)    A2W(psz)

Convert an ANSI string to a TCHAR string.

#define T2A (   psz)    W2A(psz)

Convert a TCHAR string to ANSI.

#define W2T (   psz)    (psz)

Convert a Wide string to a TCHAR string.

#define T2W (   psz)    (psz)

Convert a TCHAR string to Wide.