2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: ntoskrnl/rtl/string.c
5 * PURPOSE: Ascii string functions
6 * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
8 * 1999/07/29 ekohl Created
11 /* INCLUDES *****************************************************************/
16 /* FUNCTIONS *****************************************************************/
18 int _stricmp(const char *s1, const char *s2)
20 while (toupper(*s1) == toupper(*s2))
27 return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2));
34 char * _strlwr(char *x)
50 int _strnicmp(const char *s1, const char *s2, size_t n)
56 if (toupper(*s1) != toupper(*s2++))
57 return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
68 char* _strnset(char* szToFill, int szFill, size_t sizeMaxFill)
72 while (*szToFill != 0 && i < (int) sizeMaxFill)
86 char * _strrev(char *s)
110 char* _strset(char* szToFill, int szFill)
113 while (*szToFill != 0)
126 char *_strupr(char *x)
141 char *strstr(const char *s, const char *find)
146 if ((c = *find++) != 0)
153 if ((sc = *s++) == 0)
158 while (strncmp(s, find, len) != 0);