File tree 7 files changed +130
-0
lines changed
7 files changed +130
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_isalnum.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 18:07:26 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:10:17 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ int ft_isalnum (int c )
16
+ {
17
+ if (ft_isalpha (c ) == 1 || ft_isdigit (c ) == 1 )
18
+ return (1 );
19
+ else
20
+ return (0 );
21
+ }
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_isalpha.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 17:45:27 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:02:59 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ int ft_isalpha (int c )
16
+ {
17
+ if ((c >= 'A' && c <= 'Z' ) || (c >= 'a' && c <= 'z' ))
18
+ return (1 );
19
+ else
20
+ return (0 );
21
+ }
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_isascii.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 18:10:33 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:12:15 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ int ft_isascii (int c )
16
+ {
17
+ if (c >= 0 && c <= 127 )
18
+ return (1 );
19
+ else
20
+ return (0 );
21
+ }
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_isdigit.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 18:04:28 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:07:16 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ int ft_isdigit (int c )
16
+ {
17
+ if (c >= '0' && c <= '9' )
18
+ return (1 );
19
+ else
20
+ return (0 );
21
+ }
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_isprint.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 18:12:24 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:14:29 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ int ft_isprint (int c )
16
+ {
17
+ if (c >= 32 && c <= 126 )
18
+ return (1 );
19
+ else
20
+ return (0 );
21
+ }
Original file line number Diff line number Diff line change
1
+ /* ************************************************************************** */
2
+ /* */
3
+ /* ::: :::::::: */
4
+ /* ft_strlen.c :+: :+: :+: */
5
+ /* +:+ +:+ +:+ */
6
+ /* By: pboonpro <marvin@42.fr> +#+ +:+ +#+ */
7
+ /* +#+#+#+#+#+ +#+ */
8
+ /* Created: 2022/06/27 18:15:02 by pboonpro #+# #+# */
9
+ /* Updated: 2022/06/27 18:19:12 by pboonpro ### ########.fr */
10
+ /* */
11
+ /* ************************************************************************** */
12
+
13
+ #include "libft.h"
14
+
15
+ size_t ft_strlen (const char * s )
16
+ {
17
+ int i ;
18
+
19
+ i = 0 ;
20
+ while (s [i ] != '\0' )
21
+ {
22
+ i ++ ;
23
+ }
24
+ return (i );
25
+ }
You can’t perform that action at this time.
0 commit comments