3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: lib/ntdll/string/wstring.c
6 * PURPOSE: Wide string functions
7 * PROGRAMMER: David Welch (welch@mcmail.com)
10 * 1998/12/04 RJJ Cleaned up and added i386 def checks
13 /* INCLUDES *****************************************************************/
15 #include <ddk/ntddk.h>
19 /* FUNCTIONS *****************************************************************/
21 int _wcsicmp (const wchar_t* cs
, const wchar_t * ct
)
23 while (towlower(*cs
) == towlower(*ct
))
30 return towlower(*cs
) - towlower(*ct
);
37 wchar_t *_wcslwr (wchar_t *x
)
52 int _wcsnicmp (const wchar_t * cs
, const wchar_t * ct
, size_t count
)
57 if (towupper(*cs
) != towupper(*ct
++))
58 return towupper(*cs
) - towupper(*--ct
);
61 } while (--count
!= 0);
69 wchar_t *_wcsupr(wchar_t *x
)
83 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
)
99 return s
-str
; /* nr of wchars */
105 wchar_t *wcspbrk(const wchar_t *s1
, const wchar_t *s2
)
107 const wchar_t *scanp
;
110 while ((c
= *s1
++) != 0)
112 for (scanp
= s2
; (sc
= *scanp
++) != 0;)
115 return (wchar_t *)(--s1
);
124 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
)
140 return s
-str
; /* nr of wchars */
147 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
)
157 while (*y
&& *c
&& *y
==*c
) {