Logo Search packages:      
Sourcecode: bglibs version File versions

int str_findnextof ( const str s,
const char *  list,
unsigned  pos 
)

Find the next instance of the given list of characters, on or after pos

Definition at line 22 of file findnextof.c.

References len, s, and str_buildmap().

{
  char* p;
  int map[256];
  if (pos >= s->len) return -1;
  str_buildmap(map, list);
  for (p = s->s + pos; pos < s->len; pos++, p++)
    if (map[*(unsigned char*)p] >= 0)
      return pos;
  return -1;
}


Generated by  Doxygen 1.6.0   Back to index