ReactOS  0.4.15-dev-1039-gb9754fa
string.cpp
Go to the documentation of this file.
1 #include "stlport_prefix.h"
2 
3 #include <string>
4 
6 
7 #if defined(_STLP_USE_WIDE_INTERFACE)
9 
10 wstring __ASCIIToWide(const char *ascii) {
11  size_t size = strlen(ascii);
12  wchar_t* buff = new wchar_t[size+1];
13  mbstowcs(buff, ascii, size);
14  buff[size] = 0x00;
15  wstring ret(buff);
16  delete[] buff;
17  return ret;
18 }
19 string __WideToASCII(const wchar_t *wide) {
20  size_t size = wcslen(wide);
21  char* buff = new char[size+1];
22  wcstombs(buff, wide, size);
23  buff[size] = 0;
24  string ret(buff);
25  delete[] buff;
26  return ret;
27 }
29 #endif
30 
31 #if !defined (_STLP_NO_FORCE_INSTANTIATE)
32 
34 
36 
39 
40 # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
41 # define basic_string _STLP_NON_DBG_NAME(str)
42 
45 
46 # undef basic_string
47 # endif
48 
49 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
50 # define basic_string _STLP_NO_MEM_T_NAME(str)
51 # else
53 # endif
54 
56 
57 # if defined (basic_string)
59 # undef basic_string
60 # endif
61 
62 # if !defined (_STLP_NO_WCHAR_T)
64 
66 
68 
69 # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
70 # define basic_string _STLP_NON_DBG_NAME(str)
71 
74 
75 # undef basic_string
76 # endif
77 
78 # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND)
79 # define basic_string _STLP_NO_MEM_T_NAME(str)
80 # else
82 # endif
83 
85 
86 # if defined (basic_string)
88 # undef basic_string
89 # endif
90 # endif
91 #endif
92 
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
size_t __cdecl mbstowcs(_Out_writes_opt_z_(_MaxCount) wchar_t *_Dest, _In_z_ const char *_Source, _In_ size_t _MaxCount)
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
GLsizeiptr size
Definition: glext.h:5919
int ret
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
#define _STLP_END_NAMESPACE
Definition: features.h:503
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
size_t __cdecl wcstombs(_Out_writes_opt_z_(_MaxCount) char *_Dest, _In_z_ const wchar_t *_Source, _In_ size_t _MaxCount)
static unsigned char buff[32768]
Definition: fatten.c:17
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)