Libft is a group of user-defined C library functions created as part of the 42 project. This library is used in various other 42 C projects.
Below is a list of available functions, grouped by their respective categories.
| Function |
Description |
ft_atoi |
Converts a string to an integer. |
ft_atol |
Converts a string to a long. |
ft_itoa |
Converts an integer to a string. |
| Function |
Description |
get_next_line |
Reads a line from a file descriptor. |
| Function |
Description |
ft_putchar_fd |
Outputs a character to a file descriptor. |
ft_putendl_fd |
Outputs a string followed by a newline to a file descriptor. |
ft_putnbr_fd |
Outputs an integer to a file descriptor. |
ft_putstr_fd |
Outputs a string to a file descriptor. |
| Function |
Description |
ft_lstadd_back |
Adds an element at the end of a list. |
ft_lstadd_front |
Adds an element at the beginning of a list. |
ft_lstclear |
Deletes and frees all elements of a list. |
ft_lstdelone |
Deletes and frees a single element of a list. |
ft_lstiter |
Iterates over a list and applies a function to each element. |
ft_lstlast |
Returns the last element of a list. |
ft_lstmap |
Creates a new list by applying a function to each element of a list. |
ft_lstnew |
Creates a new list element. |
ft_lstsize |
Counts the number of elements in a list. |
| Function |
Description |
ft_bzero |
Sets all bytes in a memory area to zero. |
ft_calloc |
Allocates memory and initializes it to zero. |
ft_memchr |
Searches for a byte in a memory area. |
ft_memcmp |
Compares two memory areas. |
ft_memcpy |
Copies memory from one area to another. |
ft_memmove |
Moves memory from one area to another, handling overlaps. |
ft_memset |
Fills a memory area with a byte. |
| Function |
Description |
ft_fprintf |
Formatted output to a file descriptor. |
ft_printf |
Formatted output to standard output. |
| Function |
Description |
ft_split |
Splits a string into an array of strings. |
ft_split_pipex |
Splits a string specifically for pipex usage. |
ft_strchr |
Locates a character in a string. |
ft_strcmp |
Compares two strings. |
ft_strdup |
Duplicates a string. |
ft_striteri |
Applies a function to each character of a string. |
ft_strjoin |
Joins two strings. |
ft_strlcat |
Concatenates strings with size limitation. |
ft_strlcpy |
Copies strings with size limitation. |
ft_strlen |
Returns the length of a string. |
ft_strmapi |
Applies a function to each character of a string to create a new string. |
ft_strncmp |
Compares two strings up to a specified number of characters. |
ft_strndup |
Duplicates a specified number of characters from a string. |
ft_strnstr |
Locates a substring in a string. |
ft_strrchr |
Locates the last occurrence of a character in a string. |
ft_strtrim |
Trims leading and trailing whitespace from a string. |
ft_substr |
Extracts a substring from a string. |
| Function |
Description |
free_arr |
Frees a dynamically allocated array. |
ft_print_bit |
Prints the binary representation of a number. |
Headers