home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 13
/
AACD13.ISO
/
AACD
/
Resources
/
System
/
BoingBag1
/
Contributions
/
Workbench
/
RexxArpLib3p6
/
src
/
strchr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-06-20
|
461b
|
28 lines
/* At least one version of SC (6.57) has these two functions broken!!!!
Alas, we use them!
extern char *strchr(const char *, int);
extern char *strrchr(const char *, int);
char *strchr(const char *s, int c)
{
if (c == 0)
return(NULL);
while( *s )
if (*s++ == c)
return(s--);
return( NULL );
}
char *strrchr(const char *s, int c)
{
char *p = NULL;
if (c == 0)
return(NULL);
while ( *s )
if (*s++ == c)
p = s - 1;
return ( s );
}
*/