80size_t ft_strlcpy(
char *dst,
const char *src,
size_t size);
81size_t ft_strlcat(
char *dst,
const char *src,
size_t size);
82char *
ft_strchr(
const char *
string,
int searched_char);
83char *
ft_strrchr(
const char *
string,
int searched_char);
84int ft_strncmp(
const char *first,
const char *second,
size_t length);
85const char *
ft_strnstr(
const char *big,
const char *little,
size_t len);
87char *
ft_strndup(
const char *source,
size_t len);
88char *
ft_substr(
char const *src,
unsigned int start,
size_t len);
89char *
ft_strjoin(
char const *s1,
char const *s2);
96char *
ft_strtrim(
char const *s,
char const *set);
97char **
ft_split(
char const *s,
char c);
98char *
ft_strmapi(
char const *s,
char (*f)(
unsigned int,
char));
99void ft_striteri(
char *s,
void (*f)(
unsigned int,
char *));
116void *
ft_memcpy(
void *destination,
const void *source,
size_t size);
117void *
ft_memset(
void *pointer,
int value,
size_t count);
118void *
ft_memmove(
void *destination,
const void *source,
size_t size);
119const void *
ft_memchr(
const void *memory_block,
int searched_char,
121int ft_memcmp(
const void *src,
const void *set,
size_t size);
122void *
ft_calloc(
size_t element_count,
size_t element_size);
void ft_frees_va(void *ptr,...)
Frees multiple pointers using va_list.
Definition ft_frees_va.c:24
char * ft_strjoins_va(char const *str,...)
Allocates a new string, and returns the result of a concatenation of str and all the arguments last a...
Definition ft_strjoins_va.c:29
char * ft_itoa(int n)
Return a string representing the integer 'n' received as argument.
Definition ft_itoa.c:24
int ft_atoi_base(char *str, char *base)
Atoi with a particular base.
Definition ft_atoi_base.c:25
int ft_atoi(const char *nptr)
Convert string to int, and handle number.
Definition ft_atoi.c:21
int ft_iswhitespace(int character)
Alternative name for ft_isspace.
Definition ft_isspace.c:35
int ft_isdigit(int character)
Check if arg is a digit.
Definition ft_isdigit.c:22
int ft_isascii(int character)
Check if arg is in ascii table.
Definition ft_isascii.c:22
int ft_toupper(int character)
Transform minuscules into majuscules.
Definition ft_toupper.c:22
int ft_tolower(int character)
Transform majuscules into minuscules.
Definition ft_tolower.c:22
int ft_isspace(int character)
Check if arg is a whitespace.
Definition ft_isspace.c:22
int ft_isalpha(int character)
Check if arg is a char alphabetic.
Definition ft_isalpha.c:22
int ft_isalnum(int character)
Check if arg is a char or a digit (alphanumeric)
Definition ft_isalnum.c:22
int ft_isprint(int character)
Check if arg is in ascii table and printable.
Definition ft_isprint.c:22
void ft_frees(void **ptr)
Frees multiple pointers.
Definition ft_frees.c:21
void ft_lstadd_front(t_list **lst, t_list *new)
Adds the element ’new’ at the start of the list.
Definition ft_lstadd_front_bonus.c:21
void ft_lstiter(t_list *lst, void(*f)(void *))
Iterate on the linked list 'lst' and apply the function 'f' on the content of each element.
Definition ft_lstiter_bonus.c:22
void ft_swap_nodes(t_list **start, t_list *lst1, t_list *lst2)
Swap two nodes in a linked list (swap nodes, not content)
Definition ft_swap_nodes.c:26
void ft_lstadd_back(t_list **lst, t_list *new)
Adds the element ’new’ at the end of the list.
Definition ft_lstadd_back_bonus.c:21
void ft_lstclear(t_list **lst, void(*del)(void *))
Deletes and free the memory of the element passed as a parameter, and all the elements that follow,...
Definition ft_lstclear_bonus.c:24
t_list * ft_lstmap(t_list *lst, void *(*f)(void *), void(*del)(void *))
Iterated on the linked list 'list' and apply the function 'f' on the content of each element....
Definition ft_lstmap_bonus.c:32
t_list * ft_lstnew(void *content)
Allocate (with malloc(3)) and return a new element. The variable member 'content' is initialized with...
Definition ft_lstnew_bonus.c:25
int ft_lstsize(t_list *lst)
Count the number of elements in a list.
Definition ft_lstsize_bonus.c:21
void ft_lstdelone(t_list *lst, void(*del)(void *))
Free the memory of the element passed as a parameter using the function 'del' and free(3)....
Definition ft_lstdelone_bonus.c:24
t_list * ft_lstlast(t_list *lst)
Returns the last element of the list.
Definition ft_lstlast_bonus.c:21
void * ft_calloc(size_t element_count, size_t element_size)
Allocates a new memory zone, and set all bits to zero.
Definition ft_calloc.c:25
void ft_bzero(void *s, size_t n)
Set at 0, the n first bytes at the pointer adress.
Definition ft_bzero.c:23
void * ft_memset(void *pointer, int value, size_t count)
Set a memory zone with a value, count times.
Definition ft_memset.c:26
void * ft_memcpy(void *destination, const void *source, size_t size)
Set a memory zone with a value, count times.
Definition ft_memcpy.c:25
void * ft_memmove(void *destination, const void *source, size_t size)
Moves the memory blocks avoiding overlapping, until size blocks.
Definition ft_memmove.c:25
int ft_memcmp(const void *src, const void *set, size_t size)
Compares the first size bytes of the memory areas src and set.
Definition ft_memcmp.c:25
const void * ft_memchr(const void *memory_block, int searched_char, size_t size)
Research the first occurence of a value typed int, but interpreted as a char in a memory block.
Definition ft_memchr.c:28
ssize_t ft_putstr_fd(const char *s, int fd)
Print the string 's' on the file descriptor.
Definition ft_putstr_fd.c:23
ssize_t ft_putnbr_oct(int nbr)
Putnbr for octal.
Definition ft_putnbr_base.c:64
ssize_t ft_putnstr_fd(const char *s, size_t len, int fd)
Print the string 's' on the file descriptor until a given size or the length of s if len is greater.
Definition ft_putstr_fd.c:39
ssize_t ft_putendl_fd(const char *s, int fd)
Print the string 's' on the file descriptor, followed by a newline.
Definition ft_putendl_fd.c:23
ssize_t ft_putnendl_fd(const char *s, size_t len, int fd)
Print the string 's' on the file descriptor, followed by a newline until a given size or the length o...
Definition ft_putendl_fd.c:37
ssize_t ft_putnbr_hex_fd(unsigned int nbr, char height, int fd)
Putnbr for hex or HEX.
Definition ft_putnbr_base_hex.c:55
ssize_t ft_putnbr_hex(int nbr, char height)
Putnbr for hex or HEX.
Definition ft_putnbr_base.c:75
ssize_t ft_putptr_fd(unsigned long nbr, int fd)
Print pointer adress.
Definition ft_putnbr_base_hex.c:102
ssize_t ft_putchar_fd(const char c, int fd)
Print the character 'c' on the file descriptor.
Definition ft_putchar_fd.c:24
size_t ft_check_base_putnbr(const char *base)
Check if base is valid for putnbr_base.
Definition ft_convert_base.c:51
ssize_t ft_putnbr_base(int nbr, const char *base)
Putnbr with a particular base.
Definition ft_putnbr_base.c:23
ssize_t ft_putpointer_fd(const void *ptr)
Print pointer adress.
Definition ft_putpointer_fd.c:21
ssize_t ft_putnbr_bin(int nbr)
Putnbr for binary.
Definition ft_putnbr_base.c:54
size_t ft_check_base_atoi(const char *base)
Check if base is valid for atoi_base.
Definition ft_convert_base.c:21
ssize_t ft_putnbr_fd(long long n, int fd)
Write the int 'n' on the given file descriptor.
Definition ft_putnbr_fd.c:25
void ft_rev_int(int *tab, size_t size)
Reverse an array of ints.
Definition ft_rev_int.c:23
char * ft_strjoins(char **str)
Allocates a new string, and returns the result of a concatenation of all the strings from the array l...
Definition ft_strjoins.c:27
const char * ft_strnstr(const char *big, const char *little, size_t len)
Search a substring in a bigger string, up to len position in string.
Definition ft_strnstr.c:25
size_t ft_strlcat(char *dst, const char *src, size_t size)
Concatenate src into dst, up to size bytes.
Definition ft_strlcat.c:24
size_t ft_strlen_char(const char *the_string, int character)
Number of occurrence of character in the string.
Definition ft_strlen.c:43
char * ft_strmapi(char const *s, char(*f)(unsigned int, char))
Apply the function ’f’ to each character of the string ’s’, passing its index as first argument and t...
Definition ft_strmapi.c:26
size_t ft_strlen(const char *the_string)
Len of string without '\0'.
Definition ft_strlen.c:24
char * ft_strrchr(const char *string, int searched_char)
Find last occurrence of searched_char.
Definition ft_strrchr.c:24
char * ft_strjoin(char const *s1, char const *s2)
Allocates a new string, and returns the result of a concatenation of s1 and s2.
Definition ft_strjoin.c:24
char * ft_strndup(const char *source, size_t len)
Create a copy of source into a new pointer of size len NEEDS to be freed.
Definition ft_strdup.c:53
size_t ft_strlcpy(char *dst, const char *src, size_t size)
char ** ft_split(char const *s, char c)
Allocates with a malloc and returns an array of strings obtained by separating ’s’ using the characte...
Definition ft_split.c:29
char * ft_strchr(const char *string, int searched_char)
Find first occurrence of searched_char.
Definition ft_strchr.c:24
int ft_strncmp(const char *first, const char *second, size_t length)
Find differences between first and second.
Definition ft_strncmp.c:26
char * ft_strdup(const char *source)
Create a copy of source into a new pointer NEEDS to be freed.
Definition ft_strdup.c:24
char * ft_substr(char const *src, unsigned int start, size_t len)
Create a copy of source into a new pointer, at start, of size len NEEDS to be freed.
Definition ft_substr.c:26
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Iterate the function f on string s.
Definition ft_striteri.c:21
char * ft_strtrim(char const *s, char const *set)
Deletes all characters that exist in s and set, if they are at the beginning of the string or at the ...
Definition ft_strtrim.c:26
void ft_swap_char(char *a, char *b)
Swap 2 char values.
Definition ft_swap.c:39
void ft_swap_char_no_temp(char *a, char *b)
Works similarly as ft_swap_char but doens't use temporary variable SHOULD NOT BE USED IF a and b poin...
Definition ft_swap_no_temp.c:37
void ft_swap_str(char **a, char **b)
Swap 2 string addresses.
Definition ft_swap.c:54
void ft_swap_int(int *a, int *b)
Swap 2 int values.
Definition ft_swap.c:24
void ft_swap_int_no_temp(int *a, int *b)
Works similarly as ft_swap_int but doens't use temporary variable SHOULD NOT BE USED IF a and b point...
Definition ft_swap_no_temp.c:23
void ft_swap_mem(void **a, void **b)
Swap 2 memory adresses.
Definition ft_swap.c:69
e_bool
Basic type to mimic stdbool.
Definition libft.h:33
@ FALSE
Definition libft.h:34
@ TRUE
Definition libft.h:35
enum e_bool t_bool
Basic type to mimic stdbool.
struct s_list t_list
Structure for linked list.
Structure for linked list.
Definition libft.h:42
struct s_list * next
Definition libft.h:44
void * content
Definition libft.h:43