opti: strchr

This commit is contained in:
starnakin 2023-07-24 08:55:19 +02:00
parent a7e050c351
commit 2fab31d822

View File

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