This was the first project of the 42 curriculum. The project aims to recreate several functions from the standard libc.
Nota: 122/100 ✔️
This is the first project of the 42 curriculum. It consists of recreating various standard functions of the language to be used during the course development, since we cannot use the originals. This is a living library and new functions can be added to it, increasing its functionalities.
-
ft_isalpha
- Verifies if the param is an alphabet letter. -
ft_isdigit
- Verifies if the param is a digit(0 a 9). -
ft_isalnum
- Verifies if the param is a alphanumeric. -
ft_isascii
- Verifies if the param is a ASCII digit. -
ft_isprint
- Verifies if the param is printable. -
ft_tolower
- Lowercase the param. -
ft_toupper
- Uppercase the param. -
ft_isspace
- Verifies if the param is a space.
-
ft_strlen
- Calculates the length of a string. -
ft_strlcpy
- Copies a string from a buffer to another. -
ft_strlcat
- Concatenates two strings in a buffer. -
ft_strchr
- Locates the first occurrence of a character in a string. -
ft_strrchr
- Locates the last occurrence of a character in a string. -
ft_strnrcmp
- Compares two strings. -
ft_strnstr
- Locates a substring in a string. -
ft_strdup
- Allocates memory and copies a string. -
ft_strmapi
- Applies a function to each character of a string and returns a new string. -
ft_striteri
- Applies a function to each character of a string. -
ft_substr
- Allocates memory and returns a substring from a string. -
ft_strjoin
- Allocates memory and concatenates two strings. -
ft_strtrim
- Allocates memory and returns a copy of a string trimmed. -
ft_split
- Allocates memory and returns an array of strings obtained by splitting a string using a delimiter.
-
ft_memset
- Fills a memory block with a same byte. -
ft_bzero
- Fill a memory block with '\0'. -
ft_memcpy
- Copies a memory area. -
ft_memmove
- Copies a memory area, even if the memory areas overlap. -
ft_memchr
- Locates a byte in a memory block. -
ft_memcmp
- Compares two memory blocks. -
ft_calloc
- Allocates memory and fills it with '\0'. -
ft_swap.c
- Swaps two variables.
-
ft_atoi
- Converts a string to an integer. -
ft_atoi_base
- Converts a string to an integer in a given base. -
ft_itoa
- Returns a string representing an integer. -
ft_itoa_base
- Returns a string representing an integer in a given base. -
ft_itoa_base_u
- Returns a string representing an unsigned integer in a given base. -
ft_convert_base
- Converts a number from a base to another. -
ft_calc_nbr_digits
- Calculates the number of digits of a number. -
ft_abs
- Returns the absolute value of a number.
-
ft_putchar_fd
- Writes a character to a file descriptor. -
ft_putstr_fd
- Writes a string to a file descriptor. -
ft_putendl_fd
- Writes a string to a file descriptor, followed by a newline. -
ft_putnbr_fd
- Writes a int to a file descriptor. -
ft_putmem_fd
- Writes a memory block to a file descriptor. -
ft_putnbr_base_fd
- Writes a number in a given base to a file descriptor. -
ft_putnbr_unsigned_fd
- Writes an unsigned int to a file descriptor.
This is an extensible library, so I may add more functions in the future.