Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The very first project, a collection of useful functions

Notifications You must be signed in to change notification settings

Nuno-Jesus/42_libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Libft

This project was graded 125/100.

πŸ“’ About

This project is all about writing down a useful set of functions to later on be used on future projects. All the code was implemented by me and based on the version of the subject available from the moment of the kickoff here in Porto, 2nd November 2022.

🚨 Disclaimer

At 42, the C projects are built following a bunch of rules that enforce good coding style. Some of them are:

- No for, do while, switch, case or goto are allowed
- No more than 25 lines per function and 5 functions per file
- No assigns and declarations in the same line (unless static)
- No more than 5 variables in 1 function
... 

πŸ”§ Implementation

Part / Total Functions Function Name Implemented
Mandatory (I) / 23 ft_atoi βœ…
ft_bzero βœ…
ft_calloc βœ…
ft_isalnum βœ…
ft_isalpha βœ…
ft_isascii βœ…
ft_isdigit βœ…
ft_isprint βœ…
ft_memchr βœ…
ft_memcmp βœ…
ft_memcpy βœ…
ft_memmove βœ…
ft_memset βœ…
ft_strchr βœ…
ft_strdup βœ…
ft_strlcat βœ…
ft_strlcpy βœ…
ft_strlen βœ…
ft_strncmp βœ…
ft_strnstr βœ…
ft_strrchr βœ…
ft_tolower βœ…
ft_toupper βœ…
Mandatory (II) / 11 ft_itoa βœ…
ft_putchar_fd βœ…
ft_putendl_fd βœ…
ft_putnbr_fd βœ…
ft_putstr_fd βœ…
ft_split βœ…
ft_striteri βœ…
ft_strjoin βœ…
ft_strmapi βœ…
ft_strtrim βœ…
ft_substr βœ…
Bonus Part / 9 ft_lstadd_back βœ…
ft_lstadd_front βœ…
ft_lstclear βœ…
ft_lstdelone βœ…
ft_lstiter βœ…
ft_lstlast βœ…
ft_lstmap βœ…
ft_lstnew βœ…
ft_lstsize βœ…

πŸ“¦ Compilation

To compile the library you can either run make or make bonus in the terminal. The rule make will only compile the mandatory part of this work, while the make bonus rule will compile both the mandatory and the bonus part together.

Both rules generate a libft.a file, which is zipped version of all the object files. Imagine you have a main.c file and you want to use your library in it. You can compile it by running the following command:

$ cc -Wall -Wextra -Werror main.c -lft -L (REPLACE BY PATH TO libft.a) -I (REPLACE BY PATH TO libft.h)

πŸ’« Testing

This project was tested using the libft-unit-tester and manual revision only.

πŸ“ž Contact me

Feel free to ask me any questions through Slack (ncarvalh).

About

The very first project, a collection of useful functions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /