fixed libft
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/10/30 18:15:57 by adjoly #+# #+# */
|
||||
/* Updated: 2024/02/04 15:10:15 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/03/12 15:07:08 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -14,13 +14,10 @@
|
||||
|
||||
size_t ft_strlen(const char *s)
|
||||
{
|
||||
size_t i;
|
||||
const char *tmp;
|
||||
|
||||
i = 0;
|
||||
while (*s)
|
||||
{
|
||||
s++;
|
||||
i++;
|
||||
}
|
||||
return (i);
|
||||
tmp = s;
|
||||
while (*tmp)
|
||||
tmp++;
|
||||
return (tmp - s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user