#include "precomp.h"
#include "utils.h"
#include "stringutils.h"
Go to the source code of this file.
◆ AnsiToUnicode()
Definition at line 69 of file stringutils.c.
70{
72 int iNeededChars;
73
75
79
82
86
88}
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
#define MultiByteToWideChar
◆ AppendPathSeparator()
Definition at line 220 of file stringutils.c.
221{
222 size_t iLen = 0;
223
226
227 if (iLen >= 1)
228 {
229 lpszPath += iLen - 1;
230 if (*lpszPath++ !=
_T(
'\\'))
231 {
232 *lpszPath++ =
_T(
'\\');
233 *lpszPath =
_T(
'\0');
234 }
235 }
236
237 return lpszPath;
238}
◆ DuplicateStringA()
Definition at line 90 of file stringutils.c.
91{
93 size_t strSizePlusNull;
94
96
98
100 if (!dupStr)
return NULL;
101
103
104 return dupStr;
105}
ACPI_SIZE strlen(const char *String)
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
◆ DuplicateStringAEx()
Definition at line 124 of file stringutils.c.
125{
127 size_t strSize;
128
130
132
134 if (!dupStr)
return NULL;
135
137 dupStr[strSize] = '\0';
138
139 return dupStr;
140}
◆ DuplicateStringW()
Definition at line 107 of file stringutils.c.
108{
110 size_t strSizePlusNull;
111
113
115
117 if (!dupStr)
return NULL;
118
120
121 return dupStr;
122}
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
◆ DuplicateStringWEx()
Definition at line 142 of file stringutils.c.
143{
145 size_t strSize;
146
148
150
152 if (!dupStr)
return NULL;
153
155 dupStr[strSize] =
L'\0';
156
157 return dupStr;
158}
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
◆ FindSubStrI()
◆ FormatString()
Definition at line 33 of file stringutils.c.
34{
37
41
42 return lpszString;
43}
LPTSTR FormatStringV(LPCTSTR str, va_list args)
◆ FormatStringV()
Definition at line 16 of file stringutils.c.
17{
19 size_t strLenPlusNull;
20
22
24
26 if (!lpszString)
return NULL;
27
29
30 return lpszString;
31}
Referenced by FormatString().
◆ UnicodeToAnsi()
Definition at line 48 of file stringutils.c.
49{
51 int iNeededChars;
52
54
58
61
65
67}
#define WideCharToMultiByte
#define WC_COMPOSITECHECK