42_minishell/utils/ft_str_is_empty.c

24 lines
1.0 KiB
C
Raw Permalink Normal View History

2023-02-16 10:29:46 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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');
}