Skip to content

Commit 77f881c

Browse files
committed
meaw
1 parent ec48524 commit 77f881c

7 files changed

+130
-0
lines changed

ft_atoi.c

Whitespace-only changes.

ft_isalnum.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

ft_isalpha.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

ft_isascii.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

ft_isdigit.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

ft_isprint.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
}

ft_strlen.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
}

0 commit comments

Comments
 (0)