The 42-Libft library is a collection of basic functions in the C programming language designed to be used as a support tool in programming projects. This library has been created for the educational program of 42 school and its main objective is to teach students how to develop their own library in C.
In this repository you will find the following functions:
Function | Explanation |
---|---|
isalpha | Checks if a character is an alphabetic letter |
isdigit | Checks if a character is a digit |
isalnum | Checks if a character is an alphanumeric character |
isascii | Checks if a character is an ASCII character |
isprint | Checks if a character is a printable character |
strlen | Calculates the length of a string |
memset | Fills a section of memory with a byte |
bzero | Fills a section of memory with zeros |
memcpy | Copies a section of memory to another |
memmove | Copies a section of memory to another, even if the sections overlap |
strlcpy | Copies a string to a buffer with a limit on the size of the buffer |
strlcat | Concatenates a string to a buffer with a limit on the size of the buffer |
toupper | Converts a character to uppercase |
tolower | Converts a character to lowercase |
strchr | Finds the first occurrence of a character in a string |
strrchr | Finds the last occurrence of a character in a string |
strncmp | Compares two strings up to a number of characters |
memchr | Finds the first occurrence of a character in a section of memory |
memcmp | Compares two sections of memory |
strnstr | Find the first occurrence of a string in another string up to a number of characters |
atoi | Converts a string to an integer |
calloc | Allocates memory for an array and fills it with zeros |
strdup | Duplicates a string |
substr | Creates a substring from a string |
strjoin | Concatenates two strings |
strtrim | Removes characters from the beginning and end of a string |
split | Splits a string into an array of strings using a delimiter |
itoa | Converts an integer to a string |
strmapi | Applies a function to each character of a string |
putchar_fd | Writes a character to a file descriptor |
putstr_fd | Writes a string to a file descriptor |
putendl_fd | Writes a string to a file descriptor, followed by a newline |
putnbr_fd | Writes an integer to a file descriptor |
These functions are commonly used in C programming and can be used for a variety of tasks, from manipulating strings to manipulating data in memory.
If you encounter any issues with any of the functions or would like to contribute to this project, please feel free to create an issue or a pull request in this repository.