Newer
Older
Scratch / mobius / src / libc / string / wcsrchr.c
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 208 bytes Scratch
#include <string.h>

wchar_t* wcsrchr(const wchar_t* str, int c)
{
	const wchar_t *start = str;
	while (*str)
		str++;

	for (; str >= start; str--)
		if (*str == c)
			return (wchar_t*) str;

	return NULL;
}