Logo Search packages:      
Sourcecode: bglibs version File versions

int str_findnext ( const str s,
char  ch,
unsigned  pos 
)

Find the next instance of the given character, on or after pos

Definition at line 22 of file findnext.c.

References len, and s.

Referenced by str_count(), and striter_advance().

{
  char* p;
  if (pos >= s->len) return -1;
  p = memchr(s->s+pos, ch, s->len-pos);
  if (!p) return -1;
  return p - s->s;
}


Generated by  Doxygen 1.6.0   Back to index