29 lines
1.1 KiB
C
29 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: o_ :::::: ::: */
|
|
/* ft_strlen.c :+: / :+::+: :+: */
|
|
/* +:+ > +:++:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
|
|
/* +#+ +#+#+ +#++#+ +#+ \o/ */
|
|
/* Created: 2024/10/10 17:00:30 by whaffman #+#+# #+#+# #+# #+# | */
|
|
/* Updated: 2024/10/10 17:00:30 by whaffman ### ### ### ### / \ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
/**
|
|
* @brief ft_strlen() return the length of a null-terminated string.
|
|
*
|
|
* @param s the string.
|
|
* @return size_t the length of the string.
|
|
*/
|
|
size_t ft_strlen(const char *s)
|
|
{
|
|
size_t length;
|
|
|
|
length = 0;
|
|
while (*s++)
|
|
length++;
|
|
return (length);
|
|
}
|