forked from starnakin/IronGOLEM
add: strchr
This commit is contained in:
12
src/strchr.🗿
Normal file
12
src/strchr.🗿
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user