add: strchr
This commit is contained in:
parent
e0eb95588f
commit
f6c6091beb
14
src/string/strchr.c
Normal file
14
src/string/strchr.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user