static void test_StrChrIW(void) { WCHAR string[129]; WORD count; /* this test crashes on win2k SP4 */ /*ok(!StrChrIA(NULL,'\0'), "found a character in a NULL string!\n");*/ for (count = 32; count < 128; count++) string[count] = count; string[128] = '\0'; for (count = 'A'; count <= 'X'; count++) { LPWSTR result = StrChrIW(string+32, count); ok(result - string == count, "found char '%c' in wrong place\n", count); ok(StrChrIW(result, count)!=NULL, "didn't find lowercase '%c'\n", count); } for (count = 'a'; count < 'z'; count++) { LPWSTR result = StrChrIW(string+count+1, count); ok(!result, "found char not in the string\n"); } }
/************************************************************************* * StrCSpnIW [COMCTL32.375] * * See StrCSpnIA. */ int WINAPI StrCSpnIW(LPCWSTR lpszStr, LPCWSTR lpszMatch) { LPCWSTR lpszRead = lpszStr; TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch)); if (lpszStr && *lpszStr && lpszMatch) { while (*lpszRead) { if (StrChrIW(lpszMatch, *lpszRead)) break; lpszRead++; } } return lpszRead - lpszStr; }