]> pd.if.org Git - pdclib/blob - functions/string/strchr.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / string / strchr.c
1 // ----------------------------------------------------------------------------
2 // $Id$
3 // ----------------------------------------------------------------------------
4 // Public Domain C Library - http://pdclib.sourceforge.net
5 // This code is Public Domain. Use, modify, and redistribute at will.
6 // ----------------------------------------------------------------------------
7
8 // ----------------------------------------------------------------------------
9 // C++
10
11 const char * strchr( const char * s, int c ) { /* TODO */ };
12 char * strchr( char * s, int c ) { /* TODO */ };
13
14 // ----------------------------------------------------------------------------
15 // Standard C
16
17 char * strchr( const char * s, int c ) { /* TODO */ };
18
19 /* PDPC code - unreviewed
20 {
21     while (*s != '\0')
22     {
23         if (*s == (char)c) return ((char *)s);
24         s++;
25     }
26     return (NULL);
27 }
28 */