1 #ifndef __STRING_UTILS_H__ 2 #define __STRING_UTILS_H__ 8 m_pwszString =
const_cast<WCHAR *
>(pwszString);
11 m_uCodePage = uCodePage;
15 m_pszString =
const_cast<char *
>(pszString);
18 m_uCodePage = uCodePage;
22 if (NULL != m_pvAlloc) {
37 if (NULL == m_pszString) {
38 int nLen = WideCharToMultiByte(m_uCodePage, 0, m_pwszString, -1,
43 m_pszString = (
char *)malloc(nLen);
44 WideCharToMultiByte(m_uCodePage, 0, m_pwszString, -1,
45 m_pszString, nLen, NULL, NULL);
47 m_pvAlloc = m_pszString;
54 if (NULL == m_pwszString) {
55 int nLen = MultiByteToWideChar(m_uCodePage, 0, m_pszString, -1,
60 m_pwszString = (WCHAR *)malloc(nLen *
sizeof(WCHAR));
61 MultiByteToWideChar(m_uCodePage, 0, m_pszString, -1, m_pwszString, nLen);
63 m_pvAlloc = m_pwszString;
76 #endif //__STRING_UTILS_H__ Definition: StringUtils.h:4