home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Really Useful CD 1
/
ReallyUsefulCD1.iso
/
extras
/
progutils
/
c_utils
/
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
|
1989-03-28
|
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);
}