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 *****************************************************************/
16 #include <ddk/ntddk.h>
19 #include <internal/debug.h>
21 /* FUNCTIONS *****************************************************************/
23 int _wcsicmp (const wchar_t* cs, const wchar_t* ct)
25 while (*cs != '\0' && *ct != '\0' && towupper(*cs) == towupper(*ct))
36 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 *_wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill)
71 wchar_t *t = wsToFill;
73 while( *wsToFill != 0 && i < (int) sizeMaxFill)
86 wchar_t *_wcsrev(wchar_t *s)
108 wchar_t *_wcsupr(wchar_t *x)
123 size_t wcscspn(const wchar_t *str,const wchar_t *reject)
139 return s-str; /* nr of wchars */
145 size_t wcsspn(const wchar_t *str,const wchar_t *accept)
163 return s-str; /* nr of wchars */
170 wchar_t *wcsstr(const wchar_t *s,const wchar_t *b)
182 while (*y && *c && *y==*c)