xref: /plan9/sys/src/libc/port/runestrrchr.c (revision 59cc4ca53493a3c6d2349fe2b7f7c40f7dce7294)
1 #include <u.h>
2 #include <libc.h>
3 
4 Rune*
runestrrchr(Rune * s,Rune c)5 runestrrchr(Rune *s, Rune c)
6 {
7 	Rune *r;
8 
9 	if(c == 0)
10 		return runestrchr(s, 0);
11 	r = 0;
12 	while(s = runestrchr(s, c))
13 		r = s++;
14 	return r;
15 }
16