Moved int13 support to the VWIN32_DIOC_DOS_INT13 ioctl.
[wine/hacks.git] / unicode / string.c
blob47bce77537a68c8f6fe5fa4abb573479899f55f0
1 /*
2 * Unicode string manipulation functions
4 * Copyright 2000 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #include "wine/unicode.h"
23 int strcmpiW( const WCHAR *str1, const WCHAR *str2 )
25 for (;;)
27 int ret = toupperW(*str1) - toupperW(*str2);
28 if (ret || !*str1) return ret;
29 str1++;
30 str2++;
34 int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n )
36 int ret = 0;
37 for ( ; n > 0; n--, str1++, str2++)
38 if ((ret = toupperW(*str1) - toupperW(*str2)) || !*str1) break;
39 return ret;
42 WCHAR *strstrW( const WCHAR *str, const WCHAR *sub )
44 while (*str)
46 const WCHAR *p1 = str, *p2 = sub;
47 while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; }
48 if (!*p2) return (WCHAR *)str;
49 str++;
51 return NULL;