Exemplo n.º 1
0
/**
 * strstr with ignore case
 */
char *stristr(const char *s1, const char *s2) {
  char *p;
  int l2;

  p = (char *) s1;
  l2 = strlen(s2);
  while (*p) {
    if (strcaselessn(p, s2, l2) == 0)
      return p;
    p++;
  }
  return NULL;
}
Exemplo n.º 2
0
static inline int tree_compare(const char *key, int length, var_p_t vkey) {
  return strcaselessn(key, length, vkey->v.p.ptr, vkey->v.p.length - 1);
}