branch update for HEAD-2003021201
[reactos.git] / lib / crtdll / string / strchr.c
1 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
2 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
3 #include <msvcrt/string.h>
4
5
6 char *strchr(const char *s, int c)
7 {
8   char cc = c;
9   while (*s)
10   {
11     if (*s == cc)
12       return (char *)s;
13     s++;
14   }
15   if (cc == 0)
16     return (char *)s;
17   return 0;
18 }
19