wm: teppich

Download patch

ref: a1d3f868bb87c80eb1defda679142d0c3b59b23c
parent: 3b735b0c7ea632cc7c861cfe85b161da5cce5e36
author: mkf <mkf@cloud9p.org>
date: Sun May 26 20:43:14 EDT 2024

add strchr

--- /dev/null
+++ b/libc/strchr.c
@@ -1,0 +1,15 @@
+#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;
+}
\ No newline at end of file