git://scm.lunaixsky.com
/
lunaix-os.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
3fdd7c37c9d39d5b3e2e7a21788a84984f22d2ff
[lunaix-os.git]
/
lunaix-os
/
libs
/
klibc
/
string
/
strchr.c
1
#include <klibc/string.h>
2
#include <lunaix/types.h>
3
4
const char* weak
5
strchr(const char* str, int character)
6
{
7
char c = (char)character;
8
while ((*str)) {
9
if (*str == c) {
10
return str;
11
}
12
str++;
13
}
14
return c == '\0' ? str : NULL;
15
}