home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixtools
/
util
/
c
/
strcchr
< prev
next >
Wrap
Text File
|
1992-07-21
|
323b
|
19 lines
/* > C.Strcchr - count the no of occurrences of a character in a string */
#include <ctype.h>
#include "utils.h"
int strcchr (const char *s, char c)
{
int i = 0;
while ( *s )
{
if ( *s == c )
++i;
++s;
}
return (i);
}