-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_str_is_alpha.c
More file actions
37 lines (33 loc) · 1.35 KB
/
ft_str_is_alpha.c
File metadata and controls
37 lines (33 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_alpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bnoufel <bnoufel@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 16:04:51 by bnoufel #+# #+# */
/* Updated: 2020/02/08 19:49:38 by bnoufel ### ########.fr */
/* */
/* ************************************************************************** */
#include "char.h"
/*
** @param str
** The ft_str_is_alpha() function tests for any character for ft_isalpha is
** true.
************************* RETURN VALUES **********************************
** The ft_str_is_alpha() function returns zero if one of character tests false
** and returns non-zero if one of character tests true.
*/
int ft_str_is_alpha(const char *str)
{
size_t i;
i = 0;
while (str[i])
{
if (ft_isalpha(str[i]))
i++;
else
return (0);
}
return (1);
}