xref: /csrg-svn/usr.bin/mail/index.c (revision 3916)
11235Skas /*
21235Skas  * Determine the leftmost index of the character
31235Skas  * in the string.
41235Skas  */
51235Skas 
6*3916Skurt static char *SccsId = "@(#)index.c	2.1 07/01/81";
71235Skas 
81235Skas char *
index(str,ch)91235Skas index(str, ch)
101235Skas 	char *str;
111235Skas {
121235Skas 	register char *cp;
131235Skas 	register int c;
141235Skas 
151235Skas 	for (c = ch, cp = str; *cp; cp++)
161235Skas 		if (*cp == c)
171235Skas 			return(cp);
181235Skas 	return(NOSTR);
191235Skas }
20