The first C project at 42. The goal is to create from scratch basic libC functions.
- ft_printf : another projects that consists on implementing the libC printf function
- get_next_line : another projects that consists on implenting a readline function
- build the library without ft_printf :
make - build the library with ft_printf :
make ft_printf
| Function | LibC function | Usage |
|---|---|---|
| ft_printf | printf | formatted output |
| ft_memset | memset | fills a byte string with a byte value |
| ft_bzero | bzero | writes zeroes to a byte string |
| ft_memcpy | memcpy | copies memory area |
| ft_memccpy | memccpy | copies string until character found |
| ft_memmove | memmove | copies byte string |
| ft_memchr | memchr | locates byte in byte string |
| ft_memcmp | memcmp | compares byte string |
| ft_strlen | strlen | find length of a string |
| ft_strdup | strdup | saves a copy of a string |
| ft_strcpy | strcpy | copies strings |
| ft_strncpy | strncpy | copies strings |
| ft_strcat | strcat | concatenate strings |
| ft_strncat | strncat | concatenate strings |
| ft_strlcat | strlcat | copies and concatenates size-bounded string |
| ft_strchr | strchr | locates character in string |
| ft_strrchr | strrchr | locates character in string |
| ft_strstr | strstr | locates a substring in a string |
| ft_strnstr | strnstr | locates a substring in a string |
| ft_strcmp | strcmp | compares strings |
| ft_strncpm | strncmp | compares strings |
| ft_atoi | atoi | converts ASCII string to integer |
| ft_isalpha | isalpha | alphabetic character test |
| ft_isdigit | isdigit | decimal-digit character test |
| ft_isalnum | isalnum | alphanumeric character test |
| ft_isascii | isascii | ASCII character test |
| ft_isprint | isprint | printing character test |
| ft_toupper | toupper | lower case to upper case letter conversion |
| ft_tolower | tolower | upper case to lower case letter conversion |
| ft_putchar | putchar | outputs a character |
| Function | Usage |
|---|---|
| ft_memalloc | allocates memory in a safe way |
| ft_memdel | frees an allocated memory in a safe way |
| ft_strnew | allocates a fresh string filled with null characters |
| ft_strdel | frees an allocated string |
| ft_strclr | reset to null characters a string |
| ft_striter | applies a function to all characters in a string |
| ft_striteri | applies a function to all characters in a string |
| ft_strmap | applies a function to all characters in a string and creates new strings with the result |
| ft_strmapi | applies a function to all characters in a string and creates new strings with the result |
| ft_strequ | compares two strings |
| ft_strnequ | compares two strings until an index |
| ft_strsub | truncates a part of a string |
| ft_strjoin | concatenates two strings |
| ft_strfjoin | concatenates two strings (without leaks) |
| ft_strtrim | trims a string |
| ft_strsplit | splits an string into an array on given character |
| ft_itoa | creates a corresponding string of an integer |
| ft_putstr | outputs a string |
| ft_putendl | outputs a string followed by a newline |
| ft_putnbr | outputs an integer |
| ft_putstr_fd | writes a string on a given fd |
| ft_putendl_fd | writes a string followed by a newline on a given fd |
| ft_putnbr_fd | writes a number on a given fd |
| ft_lstnew | creates a new linked list |
| ft_lstdelone | frees a node in a linked list |
| ft_lstdel | frees a whole linked list |
| ft_lstadd | pushs an element on the head of the list |
| ft_lstiter | applies a function to a whole linked list |
| ft_lstmap | applies a function to a whole linked list and returns a new list |
| ft_factorial | returns the factorial of an integer |
| ft_abs | returns the absolute value of an integer |
| ft_sqrt | returns the square root of an integer) |
| ft_swap | swaps the values of two integers |
| ft_rgb | returns the integer value of 3 rgb values |
| get_next_line | readline of any fd |