30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strlen.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/11/07 16:56:24 by rparodi #+# #+# */
|
|
/* Updated: 2024/10/31 18:12:19 by rparodi ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
/**
|
|
* @brief Computes the length of a string.
|
|
*
|
|
* @param s The input string.
|
|
*
|
|
* @return The number of characters in the string `s`.
|
|
*/
|
|
size_t ft_strlen(const char *s)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (s[i] != '\0')
|
|
i++;
|
|
return (i);
|
|
}
|