15 lines
189 B
C
15 lines
189 B
C
|
|
#include <socks/libc/string.h>
|
||
|
|
|
||
|
|
size_t strlen(const char *str) {
|
||
|
|
if (!str) {
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
size_t res = 0;
|
||
|
|
while (str[res]) {
|
||
|
|
res++;
|
||
|
|
}
|
||
|
|
|
||
|
|
return res;
|
||
|
|
}
|