added libft
This commit is contained in:
20
libft/ft_str_is_only_char.c
Normal file
20
libft/ft_str_is_only_char.c
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* ft_str_is_only_char.c :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2024/04/29 11:11:31 by marde-vr #+# #+# */
|
||||||
|
/* Updated: 2024/04/29 11:11:57 by marde-vr ### ########.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
int ft_str_is_only_char(char *str, char c)
|
||||||
|
{
|
||||||
|
while (c && *str == c)
|
||||||
|
str++;
|
||||||
|
if (!*str && c)
|
||||||
|
return (1);
|
||||||
|
return (0);
|
||||||
|
}
|
Reference in New Issue
Block a user