A C Library
libft
is a custom C library created as part of the Hive Helsinki curriculum. The goal of this project is to recreate some standard C library functions and some additional utility functions that can be used in a wide range of projects.
The library includes a variety of functions, including string manipulation, memory management, character checks, and linked list operations. These functions mimic the behavior of their standard C library counterparts, providing a deeper understanding of these fundamental operations.
This library serves as a solid foundation for coding more complex projects in C, as it provides a suite of tested and reliable functions that students can use in their future projects.
This project was completed as a solo project.
- Clone the repository:
git clone https://github.com/lkilpela/libft.git
- Navigate into the project directory:
cd libft
- Compile the library:
make
The libft
library contains the following functions:
ft_isalnum
ft_isalpha
ft_isascii
ft_isdigit
ft_isprint
ft_toupper
ft_tolower
ft_atoi
ft_itoa
ft_putchar_fd
ft_putendl_fd
ft_putnbr_fd
ft_putstr_fd
ft_split
ft_strchr
ft_strdup
ft_striteri
ft_strjoin
ft_strlcat
ft_strlcpy
ft_strlen
ft_strmapi
ft_strncmp
ft_strnstr
ft_strrchr
ft_strchr
ft_strtrim
ft_substr
get_next_line
get_next_line_utils
ft_bzero
ft_calloc
ft_memchr
ft_memcmp
ft_memcpy
ft_memmove
ft_memset
ft_lsttadd_back
ft_lsttadd_front
ft_lstclear
ft_lstdelone
ft_lstiter
ft_lstlast
ft_lstmap
ft_lstnew
ft_lstsize
The libft
project was evaluated based on the following criteria:
-
Code Quality: The code must be clear, concise, and efficient. It should be well-organized and easy to read.
-
Functionality: All functions must work correctly and handle edge cases. The library should not have any memory leaks.
-
Compiling: The library must compile without any errors or warnings.
-
Makefile: The project should include a Makefile that compiles the library and includes rules like
all
,clean
,fclean
, andre
. -
Bonus: Bonus points were awarded for additional functions that are useful for the rest of the program.
Here are some of the comments received during the peer evaluation of the libft
project:
Peer 1: "Very good work Lumi! We talked a lot of her code and we made tests and all worked well. Code is easy to read and all solutions were very nice and easy to understand. Good luck to next evaluation!"
Peer 2: "Lumi did outstanding work on the project and is very knowledgable about all of the code we checked together. She was easily able to describe how her code works, and dissect the different portions down to the correct type of return values to be outputted. I learned a bit more about NULL , and when and where to use it! Keep up the great work."
Peer 3: "Lumi's code is extremely elegant, more readable than most I've seen so far. I feel I learnt a lot from seeing her syntax. Code all works and passes the norm, good luck with the rest of the evaluations!"
This project is licensed under the MIT License - see the LICENSE file for details.