home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
LIB
/
unix.zoo
/
strchr.c
< prev
next >
Wrap
Text File
|
2009-11-06
|
2KB
|
45 lines
/***************************************************************************/
/* */
/* strchr() : Unix library (OS9/68000) */
/* ======== */
/* */
/* Author: K. Schmitt */
/* Compiler: Microware C Vers. 3.0 */
/* OS: OS9/68000 Vers. 2.2 */
/* */
/* Edition History */
/* =============== */
/* */
/* Ed. 0.00 Date 11/15/88 */
/* First version */
/* */
/***************************************************************************/
/* */
/* Description */
/* */
/*
char *strchr (s, c)
char *s, c;
Strchr (strrchr) returns a pointer to the first (last)
occurrence of character c in string s, or NULL if c does not
occur in the string. The null character terminating a
string is considered to be part of the string.
*/
char *strchr (s, c)
register char *s, c;
{
while (*s && (*s != c)) s++;
if (*s == c) return (s);
return ((char *) 0);
} /* end of strchr */