summaryrefslogtreecommitdiff
path: root/src/string/wcsrchr.c
blob: 7503475abaee9a2ca7363cb05165f38e5b2541aa (plain) (blame)
1
2
3
4
5
6
7
8
#include <wchar.h>

wchar_t *wcsrchr(const wchar_t *s, wint_t c)
{
	const wchar_t *p;
	for (p=s+wcslen(s); p>=s && *p!=c; p--);
	return p>=s ? (wchar_t *)p : 0;
}