git://scm.lunaixsky.com
/
lunaix-os.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
rewrite the device subsystem interfaces (#48)
[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
}