2 ** strindex.c -- "unsigned" lexical index
3 ** -- Returns the index at which `needle' appears in `haystack'
5 ** This code is Copyright (c) 2002, by the authors of nmh. See the
6 ** COPYRIGHT file in the root directory of the nmh distribution for
7 ** complete copyright information.
13 stringdex(char *needle, char *haystack)
17 if (needle == NULL || haystack == NULL)
20 for (p = haystack; *p; p++)
21 if (strncasecmp(p, needle, strlen(needle))==0)
22 return (p - haystack);