17 TINT iResult = _vsnwprintf( a_pcString, size, a_pcFormat, args );
18 TASSERT( iResult != -1,
"PS2/GC/X360 do not correctly support _vsnprintf, this code will cause memory to be clobbered on those platforms! Increase the size of the destination string to avoid this problem" );
19 a_pcString[ size - 1 ] =
'\0';
25 TINT iResult = _vswprintf( a_pcString, a_pcFormat, args );
26 TASSERT( iResult != -1,
"PS2/GC/X360 do not correctly support _vsnprintf, this code will cause memory to be clobbered on those platforms! Increase the size of the destination string to avoid this problem" );
34 va_start( args, a_pcFormat );
35 TINT iResult =
FormatV( a_pcString, a_pcFormat, args );
45 va_start( args, a_pcFormat );
46 TINT iResult =
FormatV( a_pcString, size, a_pcFormat, args );
55 return wcsncmp( str1, str2, size );
57 return wcscmp( str1, str2 );
64 return _wcsnicmp( str1, str2, size );
67 return _wcsicmp( str1, str2 );
73 return wcsncpy( dst, src, size );
75 return wcscpy( dst, src );
82 wcsncpy( dst, src, size );
90 return wcsncat( dst, src, size );
92 return wcscat( dst, src );
99 if ( *str == L
'\0' )
return TNULL;
100 if ( *str == character )
return str;
111 if ( *str == L
'\0' )
return TNULL;
112 if ( *str == character )
return str;
121 return wcsstr( str, substr );
126 return wcsstr( str, substr );
131 if ( str !=
TNULL )
return wcslen( str );
140 return ( *str == L
'\0' );
148 return ( *str == L
'\0' );
171 _itow( value, dst, radix );
176 _itow( value, dst, radix );
186 return (
TFLOAT)_wtof( src );
199 const TWCHAR* pszCursor = str;
211 wszBuffer[ uiSize ] = L
'\0';
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
TFORCEINLINE const T & Min(const T &a, const T &b)
static CharType ToLowerCase(TINT a_cChar)
static CharType ToUpperCase(TINT a_cChar)
static TBOOL IsUpperCase(TINT a_cChar)
static TBOOL IsSpace(TINT a_cChar)
static TBOOL IsLowerCase(TINT a_cChar)
static TWCHAR * FindString(TWCHAR *str, const TWCHAR *substr)
static void ToUpperCase(TWCHAR *str)
static TWCHAR * Copy(TWCHAR *dst, const TWCHAR *src, TSIZE size=-1)
static TWCHAR ms_aScratchMem[SCRATCH_MEM_SIZE]
static TINT FormatV(TWCHAR *a_pcString, TINT size, const TWCHAR *a_pcFormat, va_list args)
static constexpr TSIZE SCRATCH_MEM_SIZE
static TWCHAR * CopySafe(TWCHAR *dst, const TWCHAR *src, TSIZE size)
static TSIZE Length(const TWCHAR *str)
static TWCHAR * SkipSpaces(TWCHAR *str)
static void ToLowerCase(TWCHAR *str)
static TINT CompareNoCase(const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)
static TINT Compare(const TWCHAR *str1, const TWCHAR *str2, TSIZE size=-1)
static TFLOAT StringToFloat(const TWCHAR *src)
static TINT StringToInt(const TWCHAR *src)
static TWCHAR * Concat(TWCHAR *dst, const TWCHAR *src, TSIZE size=-1)
static void IntToString(TINT value, TWCHAR *dst, TINT unused, TINT radix)
static TBOOL IsUpperCase(const TWCHAR *str)
static TBOOL IsLowerCase(const TWCHAR *str)
static TWCHAR * FindChar(TWCHAR *str, TWCHAR character)
static TINT Format(TWCHAR *a_pcString, TINT size, const TWCHAR *a_pcFormat,...)
static TWCHAR * CreateCopy(const TWCHAR *a_wszString, TSIZE a_uiSize=-1)
static void * MemCopy(void *dst, const void *src, TSIZE size)