92 #if defined(TARGET_COMPILER_GCC) 94 #define W2A16(strIn) (_wcstombs16((CHAR*)__builtin_alloca(sizeof(CHAR)*(wcslen16(strIn)+1)), strIn, wcslen16(strIn)+1)) 95 #define A2W16(strIn) (_mbstowcs16((WCHAR16*)__builtin_alloca(sizeof(WCHAR16)*(strlen(strIn)+1)), strIn, strlen(strIn)+1)) 96 #elif defined(TARGET_COMPILER_MSVC) 99 #define W2A16(strIn) (_wcstombs16((CHAR*)alloca(sizeof(CHAR)*(wcslen16(strIn)+1)), strIn, wcslen16(strIn)+1)) 100 #define A2W16(strIn) (_mbstowcs16((WCHAR16*)alloca(sizeof(WCHAR16)*(strlen(strIn)+1)), strIn, strlen(strIn)+1)) 103 #pragma warning "unknown compiler" 122 for (s = src; *s; ++s)
140 if (*src == character)
146 return const_cast<WCHAR16 *
>(p);
162 if(*src1++ != *src2++)
181 while (*src1 == *src2++)
189 return src1[0] - src2[-1];
194 while ((~0x0020 & *src1) == (~0x0020 & *src2++))
202 return src1[0] - src2[-1];
213 while ((*run++ = *src++) != L
'\0');
231 if ((dst[i++] = *src++) == 0)
249 for (i = 0; dst[i] !=
'\0'; i++)
251 for (j = 0; src[j] !=
'\0'; j++)
269 while (dst[i++] != 0)
274 if ((dst[i++] = *src++) == 0)
276 }
while (--len != 0);
304 if ( (s==NULL) || (t==NULL) || (pos<0) )
return -2;
305 while (s[pos+i] != 0)
308 while ( (s[pos+i+j] != 0) && (s[pos+i+j] == t[j]) )
342 return (
int)(s - src1);
355 for (s=src1; *s; s++)
357 for (p=src2; *p; p++)
359 if (*p == *s)
return (
WCHAR16 *) s;
380 if (((s = s1) != NULL) || ((s = *context) != NULL))
407 if(!memcmp(src1++, src2,
sizeof(
WCHAR16) * n))
422 if(!memcmp(src1++, src2,
sizeof(
WCHAR16) * n))
435 while (*src >=
'0' && *src <=
'9')
436 result = result * 10 + *src++ -
'0';
457 if ((*dst++ = (
char)*src++) == 0)
460 }
while (--len != 0);
481 if ((*dst++ = (
WCHAR16)*src++) == 0)
484 }
while (--len != 0);
527 const size_t numBits =
sizeof(T) * 8;
529 if(dst && len && (len > numBits + 1))
532 for(i = 0; i < numBits; i++)
534 T value = src & mask;
535 dst[numBits - i - 1] = (value) ?
'1' :
'0';
size_t wcstombs16(char *dst, const WCHAR16 *src, size_t len)
Function translates WCHAR16 characters from the sequence pointed by src to the multibyte equivalent s...
WCHAR16 * itow16_binary(T src, WCHAR16 *dst, const size_t len)
Function to convert a data type to a binary string. (UCHAR) 0xC => "1010".
size_t mbstowcs16(WCHAR16 *dst, const char *src, size_t len)
Function converts a sequence of multibyte characters to a corresponding sequence of WCHAR16 character...
WCHAR16 * wcsncpy16(WCHAR16 *dst, const WCHAR16 *src, size_t len)
Function copies a specified number of WCHAR16 characters of a WCHAR16 string.
wchar_t WCHAR16
UTF16 string.
char * _wcstombs16(char *dst, const WCHAR16 *src, size_t len)
Function translates WCHAR16 characters from the sequence pointed by src to the multibyte equivalent s...
WCHAR16 * wcsncat16(WCHAR16 *dst, const WCHAR16 *src, size_t len)
Function appends a WCHAR16 string with a certain length to another.
WCHAR16 * _mbstowcs16(WCHAR16 *dst, const char *src, size_t len)
Function converts a sequence of multibyte characters to a corresponding sequence of WCHAR16 character...
int wcsfind16(const WCHAR16 *s, const WCHAR16 *t, const int pos=0)
Function to determine the positon of one string in another.
WCHAR16 * wcstok_r16(WCHAR16 *s1, const WCHAR16 *s2, WCHAR16 **context)
Function to disassemble a WCHAR16 string for certain WCHAR16 characters. A sequence of calls to this ...
int wcscmp16(const WCHAR16 *src1, const WCHAR16 *src2)
Function compares two WCHAR16 strings with each other.
WCHAR16 * wcsstr16(WCHAR16 *src1, WCHAR16 *src2)
Function searches for a specific WCHAR16 string sequence in a WCHAR16 string.
int wcsncmp16(const WCHAR16 *src1, const WCHAR16 *src2, size_t len)
Function compares two WCHAR16 strings up to a certain length with each other.
WCHAR16 * wcschr16(const WCHAR16 *src, WCHAR16 character)
Function searches a WCHAR16 character in a WCHAR16 string.
int wtoi16(const WCHAR16 *src)
Function converts a WCHAR16 string to integer.
WCHAR16 * wcspbrk16(const WCHAR16 *src1, const WCHAR16 *src2)
Function scans WCHAR16 strings for characters in specified character sets.
WCHAR16 * wcscat16(WCHAR16 *dst, const WCHAR16 *src)
Function appends a WCHAR16 string to another.
WCHAR16 * wcsdup16(const WCHAR16 *src)
Function appends a WCHAR16 string with a certain length to another.
WCHAR16 * wcscpy16(WCHAR16 *dst, const WCHAR16 *src)
Function copies a WCHAR16 string.
int wcsspn16(const WCHAR16 *src1, const WCHAR16 *src2)
Function to determine the length of the matching WCHAR16 string.
size_t wcslen16(const WCHAR16 *src)