Go to the documentation of this file.
44 void *
ft_calloc(
size_t count,
size_t size);
62 void *
ft_memccpy(
void *dst,
const void *src,
int c,
size_t n);
63 void *
ft_memchr(
const void *s,
int c,
size_t n);
64 int ft_memcmp(
const void *s1,
const void *s2,
size_t n);
65 void *
ft_memcpy(
void *dst,
const void *src,
size_t n);
67 void *
ft_memmove(
void *dst,
const void *src,
size_t n);
68 void *
ft_memset(
void *b,
int c,
size_t len);
70 int ft_power(
int num,
unsigned int exponent);
84 char *
ft_strcat(
char *s1,
const char *s2);
88 int ft_strcmp(
const char *s1,
const char *s2);
89 char *
ft_strcpy(
char *dst,
const char *src);
92 int ft_strequ(
const char *s1,
const char *s2);
93 int ft_strintab(
const char *str,
char *
const tab[]);
95 void ft_striteri(
char *s,
void (*f)(
unsigned int,
char *));
96 char *
ft_strjoin(
const char *s1,
const char *s2);
98 size_t ft_strlcat(
char *dst,
const char *src,
size_t dstsize);
99 size_t ft_strlcpy(
char *dst,
const char *src,
size_t maxlen);
101 char *
ft_strmap(
char const *s,
char (*f)(
char));
102 char *
ft_strmapi(
char const *s,
char (*f)(
unsigned int,
char));
103 char *
ft_strncat(
char *s1,
const char *s2,
size_t n);
104 int ft_strncmp(
const char *s1,
const char *s2,
size_t n);
105 char *
ft_strncpy(
char *dst,
const char *src,
size_t len);
107 int ft_strnequ(
char const *s1,
char const *s2,
size_t n);
109 char *
ft_strnstr(
const char *haystack,
const char *needle,
114 char *
ft_strstr(
const char *haystack,
const char *needle);
115 char *
ft_strsub(
char const *s,
unsigned int start,
size_t len);
int ft_isascii(int c)
Replicates behaviour of isascii from libc.
int ft_isalnum(int c)
Replicates behaviour of isalnum from libc.
char * ft_strcpy(char *dst, const char *src)
Replicates behaviour of strcpy from libc.
char * ft_strmap(char const *s, char(*f)(char))
Maps a function to characters of a string.
char ft_strlast(char const *str)
Returns the last characters (other than NULL-termination) of a string.
void ft_putnbr_fd(int n, int fd)
Writes an integer to a file descriptor.
char * ft_strrev(const char *s)
Reverses a string.
int ft_isspace(int c)
Replicates behaviour of isspace from libc.
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Applies a function to characters of a string and their indices.
int ft_strcmp(const char *s1, const char *s2)
Replicates strcmp from libc.
int ft_min(int a, int b)
Returns the minimum of two integer arguments.
t_list * ft_lstmap(t_list *lst, t_list *(*f)(t_list *elem))
int ft_sqrt(int num)
Computes an integer square root of a given number, if it exists.
int ft_power(int num, unsigned int exponent)
Raises a number to a given power.
void * ft_memset(void *b, int c, size_t len)
Replicates behaviour of memset from libc.
char * ft_strchr(const char *s, int c)
Replicates behaviour of strchr from libc.
char * ft_strcat(char *s1, const char *s2)
Replicates behaviour of strcat from libc.
char * ft_strcapitalize(const char *str)
Capitalizes all words in a string.
char * ft_strrchr(const char *s, int c)
Replicates behaviour of strrchr from libc.
void ft_putstr(char const *s)
Writes a string to the standard output.
int ft_strncmp(const char *s1, const char *s2, size_t n)
Replicates behaviour of strncmp from libc.
void ft_strdel(char **as)
Frees a string and sets its pointer to NULL
char * ft_strstr(const char *haystack, const char *needle)
Replicates behaviour of strstr from libc.
char * ft_strncpy(char *dst, const char *src, size_t len)
Replicates behaviour of strncpy from libc.
void ft_putstr_fd(char const *s, int fd)
Writes a string to a file descriptor.
void ft_putchar(char c)
Writes a character to the standard output.
int ft_strcchr(char const *str, char c)
Counts the number of occurrences of a character in a string.
size_t content_size
The size of the data stored in bytes.
void * ft_memmove(void *dst, const void *src, size_t n)
Replicates behaviour of memmove from libc.
char * ft_strmapi(char const *s, char(*f)(unsigned int, char))
Maps a function to characters of a string and their indices Applies the function f to each character ...
void ft_lstdel(t_list **alst, void(*del)(void *, size_t))
Deletes all links in a list.
int ft_tolower(int c)
Replicates behaviour of tolower from libc.
void ft_putendl_fd(char const *s, int fd)
Writes a string to a file descriptor followed by a newline.
int ft_puts(char const *s)
Replicates behaviour of puts from libc.
void ft_putnstr(char *s, size_t n)
Writes the first n characters of a to the standard output.
char * ft_strndup(const char *s1, size_t len)
Makes a new string and copies up to len characters to it.
int ft_max(int a, int b)
Returns the maximum of two integer arguments.
A link in a multi-purpose linked list.
char * ft_strtrim(char const *s)
Trims whitespace from the start and end of a string.
int ft_strequ(const char *s1, const char *s2)
Checks that two strings are identical.
void * ft_memcpy(void *dst, const void *src, size_t n)
Replicates behaviour of memcpy from libc.
void * ft_memccpy(void *dst, const void *src, int c, size_t n)
Replicates behaviour of memcpy from libc.
t_list * ft_lstnew(void const *content, size_t content_size)
Allocates a new list.
char * ft_strnew(size_t size)
Allocates a fresh string.
void * content
The data contained in the link.
void ft_lstadd(t_list **alst, t_list *new)
Adds an element at the beginning of a list.
int ft_toupper(int c)
Replicates behaviour of toupper from libc.
void * ft_calloc(size_t count, size_t size)
Replicates behaviour of calloc from libc.
void ft_putendl(char const *s)
Writes a string to the standard output followed by a newline.
int ft_strintab(const char *str, char *const tab[])
Checks if a string is in a tab.
void ft_lstappend(t_list **alst, t_list *new)
Adds the element new at the end of the list.
void ft_strclr(char *s)
Sets each character of a string to 0.
char * ft_strnstr(const char *haystack, const char *needle, size_t len)
Replicates behaviour of strnstr from libc.
void ft_putchar_fd(char c, int fd)
Writes a character to a file descriptor.
struct s_list * next
The next link’s address or NULL if it’s the last link.
void ft_putnbr(int n)
Writes an integer to the standard output.
size_t ft_strlcpy(char *dst, const char *src, size_t maxlen)
Replicates behaviour of strlcpy from libc.
t_list * ft_lstlast(t_list *head)
Returns the last element of a list.
int ft_atoi(const char *str)
Replicates behaviour of atoi from libc.
int ft_isprint(int c)
Replicates behaviour of isprint from libc.
int ft_memcmp(const void *s1, const void *s2, size_t n)
Replicates behaviour of memcmp from libc.
void ft_memdel(void **ap)
Frees memory where a pointer points to and sets the pointer to NULL.
char * ft_itoa(int n)
Replicates behaviour of itoa from libc
char * ft_strsub(char const *s, unsigned int start, size_t len)
Copies a substring from a string.
void ft_putnstr_fd(char *s, size_t n, int fd)
Writes the first n characters of a string to a file descriptor.
size_t ft_strlen(const char *s)
Replicates behaviour of strlen from libc.
char * ft_strncat(char *s1, const char *s2, size_t n)
Replicates behaviour of strncat from libc.
int ft_abs(int a)
Returns the absolute value of the argument.
void ft_striter(char *s, void(*f)(char *))
Applies a function to characters of a string.
int ft_isdigit(int c)
Replicates behaviour of isdigit from libc.
char ** ft_strsplit(char const *str, char delim)
Splits a string on whitespace characters.
void * ft_memchr(const void *s, int c, size_t n)
Replicates behaviour of memchr from libc.
void ft_bzero(void *s, size_t n)
Replicates behaviour of bzero from libc.
int ft_strnequ(char const *s1, char const *s2, size_t n)
Checks that two strings are unequal.
char * ft_strdup(const char *s1)
Replicates behaviour of strdup from libc.
void ft_lstiter(t_list *lst, void(*f)(t_list *elem))
Applies a function to each member of a list.
char * ft_strjoin(const char *s1, const char *s2)
Joins two strings.
size_t ft_strlcat(char *dst, const char *src, size_t dstsize)
Replicates behaviour of strlcat from libc.
int ft_isalpha(int c)
Replicates behaviour of isalpha from libc.
void * ft_memalloc(size_t size)
Allocates memory of a given size and initializes it to 0.
void ft_lstdelone(t_list **alst, void(*del)(void *, size_t))
Deletes one link of a list.