aboutsummaryrefslogtreecommitdiff
path: root/djb/str_chr.c
blob: 1506f30e29e6b1b1a39f05e174c8748ff00ae43b (plain)
1
2
3
4
5
6
unsigned int str_chr(const char *in, char needle) /*EXTRACT_INCL*/ {
  unsigned int u=0;
  char ch;
  while ((ch=in[u]) && ch != needle) u++;
  return u;
}