add: strchr

This commit is contained in:
starnakin 2024-09-06 23:08:37 +02:00
parent e0eb95588f
commit f6c6091beb

14
src/string/strchr.c Normal file
View File

@ -0,0 +1,14 @@
char *strchr(const char *str, int c)
{
const char *start = str;
while (*start)
{
if (*start == c)
return start;
start++;
}
return NULL;
}