3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/rtl/wstring.c
6 * PURPOSE: Wide string functions
8 * PROGRAMMERS: David Welch (welch@cwcom.net)
11 /* INCLUDES *****************************************************************/
15 #include <internal/debug.h>
17 /* FUNCTIONS *****************************************************************/
19 int _wcsicmp (const wchar_t* cs
, const wchar_t* ct
)
21 while (*cs
!= '\0' && *ct
!= '\0' && towupper(*cs
) == towupper(*ct
))
32 wchar_t *_wcslwr (wchar_t *x
)
48 int _wcsnicmp (const wchar_t * cs
,const wchar_t * ct
,size_t count
)
53 if (towupper(*cs
) != towupper(*ct
++))
54 return towupper(*cs
) - towupper(*--ct
);
57 } while (--count
!= 0);
65 wchar_t *_wcsnset (wchar_t* wsToFill
, wchar_t wcFill
, size_t sizeMaxFill
)
67 wchar_t *t
= wsToFill
;
69 while( *wsToFill
!= 0 && i
< (int) sizeMaxFill
)
82 wchar_t *_wcsrev(wchar_t *s
)
104 wchar_t *_wcsupr(wchar_t *x
)
119 size_t wcscspn(const wchar_t *str
,const wchar_t *reject
)
135 return s
-str
; /* nr of wchars */
141 size_t wcsspn(const wchar_t *str
,const wchar_t *accept
)
159 return s
-str
; /* nr of wchars */
166 wchar_t *wcsstr(const wchar_t *s
,const wchar_t *b
)
178 while (*y
&& *c
&& *y
==*c
)