Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Finished and checked functions.
  • Loading branch information
Ginger-Leo authored Nov 21, 2023
1 parent 867b39a commit 587e9e1
Show file tree
Hide file tree
Showing 34 changed files with 176 additions and 547 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# By: lstorey <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/10/31 14:24:05 by lstorey #+# #+# #
# Updated: 2023/11/14 14:42:28 by lstorey ### ########.fr #
# Updated: 2023/11/21 12:09:57 by lstorey ### ########.fr #
# #
# **************************************************************************** #

Expand All @@ -26,13 +26,16 @@ SRC = ft_isalnum.c \
ft_memcpy.c \
ft_memmove.c \
ft_memset.c \
ft_putstr_fd.c \
ft_putchar_fd.c \
ft_putendl_fd.c \
ft_putnbr_fd.c \
ft_strchr.c \
ft_strlcat.c \
ft_strlcpy.c \
ft_strnstr.c \
ft_strlen.c \
ft_striteri.c \
ft_strncmp.c \
ft_strrchr.c \
ft_strdup.c \
Expand All @@ -44,7 +47,9 @@ SRC = ft_isalnum.c \
ft_substr.c \
ft_strmapi.c \
ft_strtrim.c \
ft_toupper.c
ft_itoa.c \
ft_toupper.c \
ft_split.c

OBJ = $(SRC:.c=.o)

Expand Down
11 changes: 1 addition & 10 deletions ft_atoi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/08 10:49:08 by lstorey #+# #+# */
/* Updated: 2023/11/09 09:53:01 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:06:12 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -37,12 +37,3 @@ int ft_atoi(const char *str)
}
return (rtn * neg);
}
/*
int main()
{
int i;
char str[] = "-+54d4";
i = ft_atoi(str);
printf("%d\n",i);
}
*/
14 changes: 1 addition & 13 deletions ft_bzero.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/27 21:01:36 by lstorey #+# #+# */
/* Updated: 2023/11/06 16:43:11 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:07:05 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -16,15 +16,3 @@ void ft_bzero(void *s, size_t n)
{
ft_memset(s, 0, n);
}
/*
int main ()
{
char str[] = "good day!";
printf("%zu\n", bzero((const void*)str, 4));
return(0);
}
*/
10 changes: 1 addition & 9 deletions ft_calloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/10 14:33:46 by lstorey #+# #+# */
/* Updated: 2023/11/13 10:13:21 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:07:51 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

Expand All @@ -22,11 +22,3 @@ void *ft_calloc(size_t count, size_t size)
ft_bzero(ptr, count * size);
return (ptr);
}
/*
int main()
{
ft_calloc(1, 4);
return (0);
}
*/
37 changes: 1 addition & 36 deletions ft_isalnum.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 11:25:52 by lstorey #+# #+# */
/* Updated: 2023/11/06 10:45:01 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:09:07 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

/*#include <ctype.h>
#include <unistd.h>
#include <stdio.h>*/
#include "libft.h"

int ft_isalnum(int c)
Expand All @@ -22,35 +19,3 @@ int ft_isalnum(int c)
else
return (0);
}
/*
int main(void)
{
char c;
int mine;
int actual;
c = 'k';
mine = ft_isalnum(c);
actual = isalnum(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = 'G';
mine = ft_isalnum(c);
actual = isalnum(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '!';
mine = ft_isalnum(c);
actual = isalnum(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '5';
mine = ft_isalnum(c);
actual = isalnum(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
return (0);
}
*/
37 changes: 1 addition & 36 deletions ft_isalpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 10:20:14 by lstorey #+# #+# */
/* Updated: 2023/11/06 10:46:01 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:09:56 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

/*#include <ctype.h>
#include <unistd.h>
#include <stdio.h>*/
#include "libft.h"

int ft_isalpha(int c)
Expand All @@ -22,35 +19,3 @@ int ft_isalpha(int c)
else
return (0);
}
/*
int main(void)
{
char c;
int mine;
int actual;
c = 'k';
mine = ft_isalpha(c);
actual = isalpha(c);
printf("my function = '%d'\n, actual function = '%d'\n", mine, actual);
c = 'G';
mine = ft_isalpha(c);
actual = isalpha(c);
printf("my function = '%d'\n, actual function = '%d'\n", mine, actual);
c = '!';
mine = ft_isalpha(c);
actual = isalpha(c);
printf("my function = '%d'\n, actual function = '%d'\n", mine, actual);
c = '5';
mine = ft_isalpha(c);
actual = isalpha(c);
printf("my function = '%d'\n, actual function = '%d'\n", mine, actual);
return (0);
}*/
36 changes: 1 addition & 35 deletions ft_isascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 15:53:56 by lstorey #+# #+# */
/* Updated: 2023/11/06 11:35:41 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:11:06 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

/*#include <ctype.h>
#include <unistd.h>
#include <stdio.h>*/
#include "libft.h"

int ft_isascii(int c)
Expand All @@ -22,34 +19,3 @@ int ft_isascii(int c)
else
return (0);
}
/*
int main(void)
{
char c;
int mine;
int actual;
c = -1;
mine = ft_isascii(c);
actual = isascii(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = 'G';
mine = ft_isascii(c);
actual = isascii(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '!';
mine = ft_isascii(c);
actual = isascii(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '5';
mine = ft_isascii(c);
actual = isascii(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
return (0);
}*/
19 changes: 1 addition & 18 deletions ft_isdigit.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 11:57:24 by lstorey #+# #+# */
/* Updated: 2023/11/06 10:48:31 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:11:58 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

/*#include <ctype.h>
#include <unistd.h>
#include <stdio.h>*/
#include "libft.h"

int ft_isdigit(int c)
Expand All @@ -22,17 +19,3 @@ int ft_isdigit(int c)
else
return (0);
}
/*
int main(void)
{
char c;
int mine;
int actual;
c = 'k';
mine = ft_isdigit(c);
actual = isdigit(c);
printf("my function = '%d', actual function = '%d'", mine, actual);
return (0);
}
*/
34 changes: 1 addition & 33 deletions ft_isprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
/* By: lstorey <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 15:57:41 by lstorey #+# #+# */
/* Updated: 2023/11/06 11:26:58 by lstorey ### ########.fr */
/* Updated: 2023/11/21 14:12:43 by lstorey ### ########.fr */
/* */
/* ************************************************************************** */

/*#include <ctype.h>
#include <unistd.h>
#include <stdio.h>*/
#include "libft.h"

int ft_isprint(int c)
Expand All @@ -22,32 +19,3 @@ int ft_isprint(int c)
else
return (0);
}
/*
int main(void)
{
char c;
int mine;
int actual;
c = 30;
mine = ft_isprint(c);
actual = isprint(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = ' ';
mine = ft_isprint(c);
actual = isprint(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '{';
mine = ft_isprint(c);
actual = isprint(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
c = '5';
mine = ft_isprint(c);
actual = isprint(c);
printf("my function = '%d', actual function = '%d'\n", mine, actual);
return (0);
}*/
Loading

0 comments on commit 587e9e1

Please sign in to comment.