Logo Search packages:      
Sourcecode: bglibs version File versions

unsigned str_count ( const str s,
char  ch 

Count the number of instances of a character

Definition at line 21 of file count.c.

References str_findnext().

  int pos;
  unsigned count;
  count = 0;
  for (pos = str_findfirst(s, ch); pos >= 0;
       pos = str_findnext(s, ch, pos+1))
  return count;

Generated by  Doxygen 1.6.0   Back to index