Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft Library

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.

Table of Contents

Character Functions

Function Description
ft_isalnum Checks if a character is alphanumeric.
ft_isalpha Checks if a character is alphabetic.
ft_isascii Checks if a character is ASCII.
ft_isdigit Checks if a character is a digit.
ft_isprint Checks if a character is printable.
ft_isspace Checks if a character is a whitespace.
ft_tolower Converts a character to lowercase.
ft_toupper Converts a character to uppercase.

Conversion Functions

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.

Get Next Line

Function Description
get_next_line Reads a line from a file descriptor.

Input/Output Functions

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.

List Functions

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.

Memory Functions

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.

Printf Functions

Function Description
ft_fprintf Formatted output to a file descriptor.
ft_printf Formatted output to standard output.

String Functions

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.

Utility Functions

Function Description
free_arr Frees a dynamically allocated array.
ft_print_bit Prints the binary representation of a number.

Headers

File Description
ft_lib.h Main header for libft functions.
ft_printf.h Header for printf functions.
get_next_line.h Header for get_next_line function.
libft.h Header for custom library functions.

About

Lift function files

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages