ucspi-ssl  0.99e
TLS encryption for IPv6 communication
str_chr.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include "str.h"
4 
5 unsigned int str_chr(register const char *s,int c)
6 {
7  register char ch;
8  register const char *t;
9 
10  ch = c;
11  t = s;
12  for (;;) {
13  if (!*t) break; if (*t == ch) break; ++t;
14  if (!*t) break; if (*t == ch) break; ++t;
15  if (!*t) break; if (*t == ch) break; ++t;
16  if (!*t) break; if (*t == ch) break; ++t;
17  }
18  return t - s;
19 }
unsigned int str_chr(register const char *s, int c)
Definition: str_chr.c:5