Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lumaro77 authored Dec 4, 2023
1 parent 32edcb4 commit 92bc031
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@ Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Check for an alphanumeric character; it is equivalent to ([ft_isalpha](#ft_isalpha) or [ft_isdigit](#ft_isdigit))| The character to test | 0 if the character tests false and 1 if the character tests true.

## [ft_isalpha](libft/src/ft_isalpha.c)
## [ft_isalpha](libft/ft_isalpha.c)

`int ft_isalpha(int c)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Check for a alpabetic character, it is equivalent to ([ft_isupper](#ft_isupper)(c) or [ft_islower](#ft_islower)(c)) | The character to test | 0 if the character tests false and 1 if the character tests true.

## [ft_isascii](libft/src/ft_isascii.c)
## [ft_isascii](libft/ft_isascii.c)

`int ft_isascii(int c)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Checks for an ASCII character, which is any character between 0 and octal 0177 inclusive | The character to test | 0 if the character tests false and 1 if the character tests true.

## [ft_isdigit](libft/src/ft_isdigit.c)
## [ft_isdigit](libft/ft_isdigit.c)

`int ft_isdigit(int c)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Check for a digit (0 through 9) | The character to test | 0 if the character tests false and 1 if the character tests true.

## [ft_isprint](libft/src/ft_isprint.c)
## [ft_isprint](libft/ft_isprint.c)

`int ft_isprint(int c)`

Expand All @@ -82,71 +82,71 @@ Checks for any printable character including space| The character to test | 0 if

# Functions "lst"

## [ft_lstadd_back](libft/src/ft_lstadd_back.c)
## [ft_lstadd_back](libft/ft_lstadd_back.c)

`void ft_lstadd_back(t_list **lst, t_list *new)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Adds the 'new' element to the end of a list| A pointer addres to the first element of a list | A pointer to the new element to be added to the list | None.

## [ft_lstadd_front](libft/src/ft_lstadd_front.c)
## [ft_lstadd_front](libft/ft_lstadd_front.c)

`void ft_lstadd_front(t_list **lst, t_list *new)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Adds the 'new' element to the beguining of a list| A pointer addres to the first element of a list | A pointer to the new element to be added to the list | None.

## [ft_lstclear](libft/src/ft_lstclear.c)
## [ft_lstclear](libft/ft_lstclear.c)

`void ft_lstclear(t_list **lst, void (*del)(void *))`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Deletes and frees every element of a list, using 'del' function and free(). Pointer to the is is set to NULL | A pointer addres to the first element of a list | A pointer to the fuction used to delete the content of each list element| None.

## [ft_lstdelone](libft/src/ft_lstdelone.c)
## [ft_lstdelone](libft/ft_lstdelone.c)

`void ft_lstdelone(t_list *lst, void (*del)(void *))`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Deletes and frees an element of a list, using 'del' function and free(). Memory of next should not be freed. | A pointer addres to the element to be deleted | A pointer to the fuction used to delete the content of list element| None.

## [ft_lstlast](libft/src/ft_lstlast.c)
## [ft_lstlast](libft/ft_lstlast.c)

`t_list *ft_lstlast(t_list *lst)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Returns the last element of a list | A pointer to the first element of a list | A pointer to last element of the list.

## [ft_lstiter](libft/src/ft_lstiter.c)
## [ft_lstiter](libft/ft_lstiter.c)

`void ft_lstiter(t_list *lst, void (*f)(void *))`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Iterates the list 'lst' and applies the function 'f' to the content of each element| A pointer addres to the first element of the list | A pointer to the fuction used to process the content of every element| None.

## [ft_lstmap](libft/src/ft_lstmap.c)
## [ft_lstmap](libft/ft_lstmap.c)

`t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *))`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------:| :-----------:
Iterates the list 'lst' and applies the function 'f' to the content of each element generating a new list. The 'del' function wil be used if allocation fails| A pointer addres to an element of the list | A pointer to the fuction used to iterate the list | A pointer to the fuction used to delete the content of list element (if needed) | The new list. NULL if allocation fails.

## [ft_lstnew](libft/src/ft_lstnew.c)
## [ft_lstnew](libft/ft_lstnew.c)

`t_list *ft_lstnew(void *content)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Allocates the space and returns a new list element. Content is initialized with 'content' parameter. The 'next' variable is set to NULL | Content to be used on the new element | The new element

## [ft_lstsize](libft/src/ft_lstsize.c)
## [ft_lstsize](libft/ft_lstsize.c)

`int ft_lstsize(t_list *lst)`

Expand All @@ -156,23 +156,23 @@ Counts the number of elements of a list | A pointer to the first element of a li

## Functions "mem"

## [ft_bzero](libft/src/ft_bzero.c)
## [ft_bzero](libft/ft_bzero.c)

`void *ft_bzero(void *s, size_t n)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Erases the data in the "n" bytes of the memory starting at the location pointed by "s" writing zeroes | The string on which to operate | The number of bytes | None.

## [ft_calloc](libft/src/ft_calloc.c)
## [ft_calloc](libft/ft_calloc.c)

`void *ft_calloc(size_t count, size_t size)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Allocates enough space for count objects that are size bytes of memory each, and returns a pointer to the allocated memory. The allocated memory is filled with bytes of value zero | Number of elements to be allocated | Size of elements | A pointer to the allocated memory, or NULL if the request fails.

## [ft_memset](libft/src/ft_memset.c)
## [ft_memset](libft/ft_memset.c)

`void *ft_memset(void *s, int c, size_t len)`

Expand All @@ -181,31 +181,31 @@ Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
Fill with "len" bytes of "c" the memory of "s"| The string on which to operate | Value c (converted to an unsigned char) | The number of bytes | A pointer to the memory area s.


## [ft_memcpy](libft/src/ft_memcpy.c)
## [ft_memcpy](libft/ft_memcpy.c)

`void *ft_memcpy(void *dst, const void *src, size_t n)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Copies n bytes from memory area src to memory of dst. The memory areas must not overlap. Use [ft_memmove](#ft_memmove) if the memory areas do overlap.| Memory area dst | Memory area src | The number of bytes | A pointer to the memory area dst.

## [ft_memchr](libft/src/ft_memchr.c)
## [ft_memchr](libft/ft_memchr.c)

`void *ft_memchr(const void *s, int c, size_t n)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Scans the initial n bytes of s for the first instance of c | Memory area s| A character to search | The number of bytes | A pointer to the matching byte or NULL if the character does not occur in the given memory area.

## [ft_memcmp](libft/src/ft_memcmp.c)
## [ft_memcmp](libft/ft_memcmp.c)

`void *ft_memcmp(void *dst, const void *src, size_t n)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Compares byte string s1 against byte string s2 | Memory area s1| Memory area s2 | The number of bytes | < 0 if s1 is less than s2, > 0 if s1 is graeter than s2, = 0 if s1 is equal to s2.

## [ft_memmove](libft/src/ft_memmove.c)
## [ft_memmove](libft/ft_memmove.c)

`void *ft_memmove(void *dst, const void *src, size_t len)`

Expand All @@ -215,31 +215,31 @@ Copies len bytes from the memory of src to dst. Memories may overlap. First, the

## Functions "put"

## [ft_putchar_fd](libft/src/ft_putchar_fd.c)
## [ft_putchar_fd](libft/ft_putchar_fd.c)

`void ft_putchar_fd(char c, int fd)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Sends the character 'c' to the file descriptor | The character to be send | The file descriptor | None.

## [ft_putstr_fd](libft/src/ft_putstr_fd.c)
## [ft_putstr_fd](libft/ft_putstr_fd.c)

`void ft_putstr_fd(char *s, int fd)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Sends the string 's' to the file descriptor | The string to be send | The file descriptor | None.

## [ft_putendl_fd](libft/src/ft_putendl_fd.c)
## [ft_putendl_fd](libft/ft_putendl_fd.c)

`void ft_putendl_fd(char *s, int fd)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Sends the string 's' to the file descriptor, followed by an newline character | The string to be send | The file descriptor | None.

## [ft_putnbr_fd](libft/src/ft_putnbr_fd.c)
## [ft_putnbr_fd](libft/ft_putnbr_fd.c)

`void ft_putnbr_fd(int n, int fd)`

Expand All @@ -249,84 +249,84 @@ Sends the nunber 'n' to the file descriptor | The number to be send | The file d

## Functions "str"

## [ft_split](libft/src/ft_split.c)
## [ft_split](libft/ft_split.c)

`char **ft_split(char const *s, char c)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Allocates (with malloc) and returns an array of strings obtained by splitting s using the character 'c' as a delimiter. The array must be ended by a NULL pointer|The string to be split |The delimiter character| The array of new strings result of the split. NULL if the allocation fails.

## [ft_strchr](libft/src/ft_strchr.c)
## [ft_strchr](libft/ft_strchr.c)

`char *ft_strchr(const char *s, int c)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Locates the first occurrence of 'c' in the string pointed to by 's'. The terminating null character is considered to be part of the string, therefore if 'c' is '\0', locates the terminating '\0'| Pointer to string | Character to be located | A pointer to the first occurrence of the character c in the string or NULL if the character is not found.

## [ft_strdup](libft/src/ft_strdup.c)
## [ft_strdup](libft/ft_strdup.c)
`char *ft_strdup(const char *s))`

Description | Param. 1st | Return Values
:-----------: | :-----------: | :-----------:
Duplicate string s1. Memory for the new string is obtained with malloc, and can be freed with free | The string to duplicate| A pointer to the duplicated string. NULL if insufficient memory was available.

## [ft_striteri](libft/src/ft_striteri.c)
## [ft_striteri](libft/ft_striteri.c)

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:| :-----------:
Applies the function 'f' to all the characters of a string, using the index as first argument. Every character is passed as a pointer allowing to be changed | The string to iterare | The function to apply to each character | None.


## [ft_strjoin](libft/src/ft_strjoin.c)
## [ft_strjoin](libft/ft_strjoin.c)

`char *ft_strjoin(char const *s1, char const *s2)`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Allocates (with malloc) and returns a new string, result of the concatenation of s1 and s2 |The prefix string |The suffix string | The new string. NULL if the allocation fails.

## [ft_strlcpy](libft/src/ft_strlcpy.c)
## [ft_strlcpy](libft/ft_strlcpy.c)

`size_t ft_strlcpy(char *dst, const char *src, size_t dstsize)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Copies up to dstsize - 1 characters from the NUL-terminated string src to dst, NUL-terminating the result| Destination array | String to be copied | Number of characters to be copied from src | Total length of the string to create (length of src).

## [ft_strlcat](libft/src/ft_strlcat.c)
## [ft_strlcat](libft/ft_strlcat.c)

`size_t ft_strlcat(char *dst, const char *src, size_t size)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Concatenate the string src to the end of dst. It will concatenate at most size - strlen(dst) - 1 bytes, NUL-terminating the result | Destination array | String to be appended to dst | Maximum number of characters to be appended | The initial length of dst plus the length of src.

## [ft_strlen](libft/src/ft_strlen.c)
## [ft_strlen](libft/ft_strlen.c)
`size_t ft_strlen(const char *s)`

Description | Param. 1st | Return Values
:-----------: | :-----------: | :-----------:
Calculates the length of the string pointed to by s, excluding the terminating null byte ('\0') | The string to calculate | Number of characters in the string pointed to by s.

## [ft_strmapi](libft/src/ft_strmapi.c)
## [ft_strmapi](libft/ft_strmapi.c)

`char *ft_strmapi(char const *s, char (*f)(unsigned int, char))`

Description | Param. 1st | Param. 2nd | Return Value
:-----------: | :-----------: | :-----------: | :-----------:
Applies the function f to each character of the string passed as argument to create a new string (with malloc) resulting from successive applications of f |The string on which to iterate| The function to apply to each character| The string created from the successive applications of f. Returns NULL if the allocation fails.

## [ft_strncmp](libft/src/ft_strncmp.c)
## [ft_strncmp](libft/ft_strncmp.c)

`int strncmp(const char *s1, const char *s2, size_t n)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
:-----------: | :-----------: | :-----------: | :-----------: | :-----------:
Lexicographically compare the null-terminated strings s1 and s2, but not more than n characters. The comparison is done using unsigned characters | The fisrt string to compare | The second string to compare | The maximun number of character to use of each string to do the comparision | An integer greater than, equal to, or less than 0, according as the string s1 is greater than, equal to, or less than the string s2.

## [ft_strnstr](libft/src/ft_strnstr.c)
## [ft_strnstr](libft/ft_strnstr.c)

`char *ft_strnstr(const char *haystack, const char *needle, size_t len)`

Expand All @@ -335,7 +335,7 @@ Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
Locate substring, where not more than 'len' characters are searched. Finds the first occurrence of the substring 'needle' in the string 'haystack'. The terminating null bytes ('\0') are not compared. | String to be scanned | The small string to be searched in 'haystack' string|The maximum amount of characters to be searched |A pointer to the first character of the first occurrence of little is returned. NULL if the substring is not found. If 'needle' is an empty string, 'haystack' is returned.


## [ft_strrchr](libft/src/ft_strrchr.c)
## [ft_strrchr](libft/ft_strrchr.c)

`char *ft_strrchr(const char *s, int c)`

Expand All @@ -344,7 +344,7 @@ Description | Param. 1st | Param. 2nd | Return Value
Locates the last occurrence of 'c' in the string pointed to by 's'. The terminating null character is considered to be part of the string, therefore if 'c' is '\0', locates the terminating '\0'| Pointer to string | Character to be located | A pointer to the last occurrence of the character c in the string or NULL if the character is not found.


## [ft_strtrim](libft/src/ft_strtrim.c)
## [ft_strtrim](libft/ft_strtrim.c)

`char *ft_strjoin(char const *s1, char const *s2)`

Expand All @@ -353,7 +353,7 @@ Description | Param. 1st | Param. 2nd | Return Value
Allocates (with malloc) and returns a copy of the string given as argument without the characters specified in the set argument at the beginning and the end of the string|The string to be trimmed |The reference set of character to trim | The trimmed string. NULL if the allocation fails.


## [ft_substr](libft/src/ft_substr.c)
## [ft_substr](libft/ft_substr.c)
`char *ft_substr(char const *s, unsigned int start, size_t len)`

Description | Param. 1st | Param. 2nd | Param. 3rd | Return Value
Expand All @@ -363,31 +363,31 @@ Allocates (with malloc) and returns a substring from the string given in argumen

## Functions "to"

## [ft_atoi](libft/src/ft_atoi.c)
## [ft_atoi](libft/ft_atoi.c)

`int ft_atoi(const char *str)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Convert a string to a integer | The string to be converted to int | The converted value.

## [ft_itoa](libft/src/ft_itoa.c)
## [ft_itoa](libft/ft_itoa.c)

`char ft_itoa(int n)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
Allocates (with malloc) and returns a string representing the integer received as an argument. Negative numbers must be handled | The integer to convert | The string representing the integer. NULL if the allocation fails.

## [ft_tolower](libft/src/ft_tolower.c)
## [ft_tolower](libft/ft_tolower.c)

`int ft_tolower(int c)`

Description | Param. 1st | Return Value
:-----------: | :-----------: | :-----------:
If the character passed as an argument is an uppercase, convert to lower| The character to convert | If c is a uppercase letter, returns its lowercase equivalent. Otherwise, it returns c.

## [ft_toupper](libft/src/ft_toupper.c)
## [ft_toupper](libft/ft_toupper.c)

`int ft_toupper(int c)`

Expand Down

0 comments on commit 92bc031

Please sign in to comment.