mirror of
https://github.com/LucasCodeur/alcu.git
synced 2026-04-28 17:44:34 +02:00
26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strlen.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/11/05 11:17:31 by dgaillet #+# #+# */
|
|
/* Updated: 2026/03/28 14:47:54 by lud-adam ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
size_t ft_strlen(char *str, char c)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
if (!str)
|
|
return (0);
|
|
while (str[i] && str[i] != c)
|
|
i++;
|
|
return (i);
|
|
}
|