3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/rtl/string.c
6 * PURPOSE: Ascii string functions
8 * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de)
11 /* INCLUDES *****************************************************************/
13 #include <internal/ctype.h>
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);