int	ft_str_is_printable(char *str)
{
	int	i;

	i = 0;
	while (str[i] != '\0')
	{
		if (str[i] >= 32 && str[i] <= 127) // si plus grand ou egal a 32 et plus petit egal 127 alros incr
    		i++;
        else
            return (0);
	}
	return (1);
}

/*
#include <stdio.h>

int main(void)
{
    
    int result1;
    char str1[] = "ABCsdaf13256980234i2l;'123l4-0o;'l";
    result1 = ft_str_is_printable(str1);
    printf("afficable  ? %d\n", result1);
 
   
    char str2[] = "sadfDSFS1][;''";
    int result2 = ft_str_is_printable(str2);
    printf("afficable   ? %d\n", result2);

  
    char str3[] = "";
    int result3 = ft_str_is_printable(str3);
    printf("afficable  ? %d\n", result3);

    return 0;
}*/

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: