wm: teppich

ref: a1d3f868bb87c80eb1defda679142d0c3b59b23c
dir: /libc/strchr.c/

View raw version
#include <u.h>
#include <libc.h>

char*
strchr(char *s, char c)
{
	char *new = strdup(s);
	while(*new != c || *new != '\0')
		new++
	
	if(*new == c)
		return new;
	
	return nil;
}