Removed inclusion of wine/winestring.h from winbase.h and added it to
[wine/multimedia.git] / unicode / string.c
blobdec7ec6a6120a943c59d865a3ccfac2ea10a2217
1 /*
2 * Unicode string manipulation functions
4 * Copyright 2000 Alexandre Julliard
5 */
7 #include "wine/unicode.h"
9 int strcmpiW( const WCHAR *str1, const WCHAR *str2 )
11 for (;;)
13 int ret = toupperW(*str1) - toupperW(*str2);
14 if (ret || !*str1) return ret;
15 str1++;
16 str2++;
20 int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n )
22 int ret = 0;
23 for ( ; n > 0; n--, str1++, str2++)
24 if ((ret = toupperW(*str1) - toupperW(*str2)) || !*str1) break;
25 return ret;
28 WCHAR *strstrW( const WCHAR *str, const WCHAR *sub )
30 while (*str)
32 const WCHAR *p1 = str, *p2 = sub;
33 while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
34 if (!*p2) return (WCHAR *)str;
35 str++;
37 return NULL;