cswinWtoA Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
cswinWtoA Struct Reference

Small helper to convert a wide to an ANSI string, useful when passing arguments to a function. More...

`#include <csutil/win32/wintools.h>`

List of all members.

## Public Member Functions
| cswinWtoA (const wchar_t *ws)
| Construct from a wchar_t string.
| operator const char * () const
| Return the string passed in on construction as an ANSI string.
| ~cswinWtoA ()
| Destruct, free up memory.

## Detailed Description

Small helper to convert a wide to an ANSI string, useful when passing arguments to a function.

      wchar_t test[] = L"Foo";
      SomeFunctionA (cswinWtoA (test));

Remarks:
  This class provides functionality specific to the Win32 platform. To ensure that code using this functionality compiles properly on all other platforms, the use of the class and inclusion of the header file should be surrounded by appropriate ' '#if defined(CS_PLATFORM_WIN32) ... #endif' statements.

Definition at line 93 of file wintools.h.

## Constructor & Destructor Documentation

cswinWtoA::cswinWtoA | ( | const wchar_t * | ws | ) | `[inline]`

Construct from a wchar_t string.

Definition at line 99 of file wintools.h.

cswinWtoA::~cswinWtoA | ( |  | ) | `[inline]`

Destruct, free up memory.

Definition at line 102 of file wintools.h.

## Member Function Documentation

cswinWtoA::operator const char * | ( |  | ) | const`[inline]`

Return the string passed in on construction as an ANSI string.

Definition at line 105 of file wintools.h.

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

- csutil/win32/wintools.h