home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixtools
/
util
/
c
/
strcchr
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-07-21
|
323 b
|
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);
}