feat: initial version
This commit is contained in:
parent
5cad2db883
commit
6428ed06b0
16 changed files with 263 additions and 0 deletions
14
srcs/ft_strlen.c
Normal file
14
srcs/ft_strlen.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include <stddef.h>
|
||||
|
||||
size_t ft_strlen(const char *s)
|
||||
{
|
||||
const char *p = s;
|
||||
|
||||
if (!s)
|
||||
return 0;
|
||||
|
||||
while (*p)
|
||||
++p;
|
||||
|
||||
return (size_t)(p - s);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue