9 #include "GenericPlatform/GenericWidePlatformString.h"
11 #include "GenericPlatform/GenericPlatformString.h"
13#include "GenericPlatform/GenericPlatformStricmp.h"
21
22
25#pragma warning(disable : 4996
)
26#pragma warning(disable : 4995
)
46
47
50 return (WIDECHAR*)_tcscpy(Dest, Src);
55 _tcsncpy(Dest, Src, MaxLen-1);
62 return (WIDECHAR*)_tcscat(Dest, Src);
67 return (WIDECHAR*)_tcsupr(Dest);
72 return _tcscmp(String1, String2);
75 static FORCEINLINE int32
Strncmp(
const WIDECHAR* String1,
const WIDECHAR* String2, SIZE_T Count )
77 return _tcsncmp( String1, String2, Count );
82 return _tcslen( String );
87 return _tcsnlen( String, StringSize );
92 return _tcsstr( String, Find );
97 return _tcschr( String, C );
102 return _tcsrchr( String, C );
107 return _tstoi( String );
112 return _tstoi64( String );
117 return (
float)_tstof( String );
122 return _tcstod( String, NULL );
127 return _tcstoul( Start, End, Base );
132 return _tcstoi64( Start, End, Base );
137 return _tcstoui64( Start, End, Base );
140 static FORCEINLINE WIDECHAR*
Strtok(WIDECHAR* StrToken,
const WIDECHAR* Delim, WIDECHAR** Context)
142 return _tcstok_s(StrToken, Delim, Context);
151 int32 Result = vswprintf(Dest, DestSize, Fmt, ArgPtr);
158
159
162 return (ANSICHAR*)strcpy(Dest, Src);
167 strncpy(Dest, Src, MaxLen);
174 return (ANSICHAR*)strcat( Dest, Src );
179 return (ANSICHAR*)_strupr(Dest);
184 return strcmp(String1, String2);
189 return strncmp( String1, String2, Count );
194 return strlen( String );
199 return strnlen( String, StringSize );
204 return strstr(String, Find);
209 return strchr(String, C);
214 return strrchr(String, C);
219 return atoi( String );
224 return _strtoi64( String, NULL, 10 );
229 return (
float)atof( String );
234 return atof( String );
239 return strtol( Start, End, Base );
244 return _strtoi64( Start, End, Base );
249 return _strtoui64( Start, End, Base );
252 static FORCEINLINE ANSICHAR*
Strtok(ANSICHAR* StrToken,
const ANSICHAR* Delim, ANSICHAR** Context)
254 return strtok_s(StrToken, Delim, Context);
259 int32 Result = vsnprintf( Dest, DestSize, Fmt, ArgPtr );
261 return (Result != -1 && Result < (int32)DestSize) ? Result : -1;
265
266
270 return _tcslen( (
const WIDECHAR*)String );
275 return _tcsnlen( (
const WIDECHAR*)String, StringSize );
279
280
283 return (UTF8CHAR*)
Strcpy((ANSICHAR*)Dest
, DestCount
, (
const ANSICHAR*)Src
);
288 return (UTF8CHAR*)
Strncpy((ANSICHAR*)Dest
, (
const ANSICHAR*)Src
, MaxLen
);
293 return (UTF8CHAR*)
Strcat((ANSICHAR*)Dest
, DestCount
, (
const ANSICHAR*)Src
);
298 return (UTF8CHAR*)
Strupr((ANSICHAR*)Dest
, DestCount
);
303 return Strcmp((
const ANSICHAR*)String1
, (
const ANSICHAR*)String2
);
308 return Strncmp((
const ANSICHAR*)String1
, (
const ANSICHAR*)String2
, Count
);
313 return Strlen((
const ANSICHAR*)String
);
318 return Strnlen((
const ANSICHAR*)String
, StringSize
);
323 return (
const UTF8CHAR*)
Strstr((
const ANSICHAR*)String
, (
const ANSICHAR*)Find
);
328 return (
const UTF8CHAR*)
Strchr((
const ANSICHAR*)String
, (ANSICHAR)C
);
333 return (
const UTF8CHAR*)
Strrchr((
const ANSICHAR*)String
, (ANSICHAR)C
);
338 return Atoi((
const ANSICHAR*)String
);
343 return Atoi64((
const ANSICHAR*)String
);
348 return Atof((
const ANSICHAR*)String
);
353 return Atod((
const ANSICHAR*)String
);
358 return Strtoi((
const ANSICHAR*)Start
, (ANSICHAR**)End
, Base
);
363 return Strtoi64((
const ANSICHAR*)Start
, (ANSICHAR**)End
, Base
);
368 return Strtoui64((
const ANSICHAR*)Start
, (ANSICHAR**)End
, Base
);
371 static FORCEINLINE UTF8CHAR*
Strtok(UTF8CHAR* StrToken,
const UTF8CHAR* Delim, UTF8CHAR** Context)
373 return (UTF8CHAR*)
Strtok((ANSICHAR*)StrToken
, (
const ANSICHAR*)Delim
, (ANSICHAR**)Context
);
378 return GetVarArgs((ANSICHAR*)Dest
, DestSize
, *(
const ANSICHAR**)&Fmt
, ArgPtr
);