lib: c: core: implement strchr and strcspn

This commit is contained in:
2026-03-25 20:21:28 +00:00
parent 96784f611f
commit 6787f28728
3 changed files with 35 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#include <stddef.h>
char *strchr(const char *str, int c)
{
while (1) {
if (*str == c) {
return (char *)str;
}
if (*str == 0) {
break;
}
}
return NULL;
}