]> pd.if.org Git - pdclib/blob - functions/string/strchr.c
Added some of <string.h>.
[pdclib] / functions / string / strchr.c
1 /* $Id$ */
2
3 /* Release $Name$ */
4
5 /* strchr( const char *, int )
6
7    This file is part of the Public Domain C Library (PDCLib).
8    Permission is granted to use, modify, and / or redistribute at will.
9 */
10
11 #include <string.h>
12
13 char * strchr( const char * s, int c )
14 {
15     do
16     {
17         if ( *s == (char) c )
18         {
19             return (char *) s;
20         }
21     } while ( *s++ );
22     return NULL;
23 }