This project is about coding a C library. It will contain a lot of general purpose functions your programs will rely upon.
Implementation of original functions
ft_isalpha
checks for an alphabetic characterft_isdigit
checks for an digit characterft_isalnum
checks for an alphanumeric characterft_isascii
checks for an ASCII characterft_isprint
checks for an printable characterft_strlen
calculate string lengthft_memset
fill memoryft_bzero
set byte zeroft_memcpy
memory area copy (not overlap)ft_memmove
memory area copy (may overlap)ft_strlcpy
string limited copyft_strlcat
string limited concatenationft_toupper
convert uppercaseft_tolower
convert lowercaseft_strchr
locate character in string (first occurrence)ft_strrchr
locate character in string (last occurrence)ft_strncmp
compare part of two stringsft_memchr
locate character in memory (first occurrence)ft_memcmp
compare memory areasft_strnstr
locate a substring in a string limitedft_atoi
convert a string to an integerft_calloc
a memory allocatorft_strdup
duplicate a string
Functions that are either not in the libc, or that are part of it but in a different form
ft_substr
create a substringft_strjoin
create a concatenated stringft_strtrim
create a string trimmedft_split
split a stringft_itoa
convert a integer to an stringft_strmapi
create a new string applying a functionft_striteri
apply a function to each string characterft_putchar_fd
outputs the characterft_putstr_fd
outputs the stringft_putendl_fd
outputs the string followed by a newlineft_putnbr_fd
outputs the integer
Functions that manipulating lists
ft_lstnew
create new node of listft_lstadd_front
adds the node to beginning of listft_lstsize
counts the number of nodes in a listft_lstlast
returns the last node of the listft_lstadd_back
adds the node to end of listft_lstdelone
frees node memoryft_lstclear
frees list memoryft_lstiter
applies the function on content of each nodeft_lstmap
creates a new list resulting of applying of the function
Run tests
gcc -g libft.h ft_*.c tests.c -lbsd -o tests.out && ./tests.out