]> diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/subs/r1bindex.c
Update XOAUTH2 documentation.
[nmh] / docs / historical / mh-nov-1983 / subs / r1bindex.c
1 /*
2 * r1bindex(str, chr) stands for Right plus 1 or Beginning index of
3 * chr in str. I.e. return ptr 1 past LAST occurance of chr in
4 * str, OR beginning of the string if str doesn't contain chr.
5 */
6
7 char *
8 r1bindex(str, chr)
9 register char *str;
10 register int chr;
11 {
12 register char *cp;
13
14 for(cp = str; *cp; cp++) ;
15 --cp;
16 while(cp >= str && *cp != chr)
17 --cp;
18 return ++cp;
19 }