#include "wx/wxchar.h"
#include <string.h> // strdup
-#ifdef HAVE_WCSTR_H
-#include <wcstr.h>
-#elif defined( HAVE_WCHAR_H )
-#include <wchar.h> // wchar_t
-#else
-#pragma error "Don't know what to do!"
-#endif
-
// ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead
// of new/delete
}
operator const char *() const { return m_str; }
+ char operator[](size_t n) const { return m_str[n]; }
private:
char *m_str;
};
+#if wxUSE_WCHAR_T
class wxWCharBuffer
{
public:
}
operator const wchar_t *() const { return m_wcs; }
-
+ wchar_t operator[](size_t n) const { return m_wcs[n]; }
+
private:
wchar_t *m_wcs;
};
+#endif
#if wxUSE_UNICODE
#define wxMB2WXbuf wxWCharBuffer