42_minishell/utils/ft_str_is_empty.c
2023-02-16 16:29:46 +01:00

24 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_empty.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/16 16:12:46 by cchauvet #+# #+# */
/* Updated: 2023/02/16 16:13:07 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "utils.h"
int ft_str_is_empty(const char *str)
{
size_t i;
i = 0;
while (str[i] == ' ')
i++;
return (str[i] == '\0');
}