13 lines
171 B
C
13 lines
171 B
C
|
#include <string.h>
|
||
|
|
||
|
__attribute__((weak)) size_t strlen(char const *str)
|
||
|
{
|
||
|
size_t i;
|
||
|
|
||
|
if (str == NULL)
|
||
|
return (0);
|
||
|
i = -1;
|
||
|
while (str[++i] != '\0');
|
||
|
return (i);
|
||
|
}
|