add: strchr

This commit is contained in:
Camille Chauvet
2023-06-12 18:27:02 +00:00
parent 37d2b05896
commit 88b1ae93b3
2 changed files with 24 additions and 0 deletions

12
src/strchr.🗿 Normal file
View File

@ -0,0 +1,12 @@
strchr(str, c)
{
local i;
i = 0;
loop {
if ([str + i] == c)
return (str + i);
if ([str + i] == 0)
return (0);
i = i + 1;
}
}