ft_str_is_printable

This commit is contained in:
Tanguy MAZE
2018-04-09 11:13:08 +02:00
parent e59a27aa74
commit 4e6c470108
2 changed files with 26 additions and 2 deletions

24
ft_str_is_printable.c Normal file
View File

@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_printable.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/09 10:29:18 by tmaze #+# #+# */
/* Updated: 2018/04/09 11:11:56 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_str_is_printable(char *str)
{
int i;
i = 0;
while (str[i])
if (!ft_isprint(str[i++]))
return (0);
return (1);
}