3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/rtl/wstring.c
6 * PURPOSE: Wide string functions
7 * PROGRAMMER: David Welch (welch@cwcom.net)
10 * 1998/12/04 RJJ Cleaned up and added i386 def checks.
11 * 1999/07/29 ekohl Added missing functions.
14 /* INCLUDES *****************************************************************/
18 #include <internal/debug.h>
20 /* FUNCTIONS *****************************************************************/
22 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
)
24 while (*cs
!= '\0' && *ct
!= '\0' && towupper(*cs
) == towupper(*ct
))
35 wchar_t *_wcslwr (wchar_t *x
)
51 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
)
56 if (towupper(*cs
) != towupper(*ct
++))
57 return towupper(*cs
) - towupper(*--ct
);
60 } while (--count
!= 0);
68 wchar_t *_wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
)
70 wchar_t *t
= wsToFill
;
72 while( *wsToFill
!= 0 && i
< (int) sizeMaxFill
)
85 wchar_t *_wcsrev(wchar_t *s
)
107 wchar_t *_wcsupr(wchar_t *x
)
122 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
)
138 return s
-str
; /* nr of wchars */
144 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
)
162 return s
-str
; /* nr of wchars */
169 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
)
181 while (*y
&& *c
&& *y
==*c
)