Skip to content

PedroDrago/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

184 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft

This project goal is to write my own C library with some reproductions of libc, stdlib and functions from other sources.

Function Description External Functions
ft_isalpha Checks for an alphabetic character. None
ft_isdigit Checks for a digit (0 through 9). None
ft_isalnum Checks for an alphanumeric character. None
ft_isascii Checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. None
ft_isprint Checks for any printable character including space. None
ft_strlen Calculates and returns the length of a string, excluding the terminating null byte (\0). None
ft_memset Fills the first n bytes of a memory area with the byte c. None
ft_bzero Erases the data in the n bytes of a memory area by writing zeros (bytes containing \0) to that area. None
ft_memcpy Copies n bytes from a source memory area to a destine memory area. The areas may not overlap. None
ft_memmove Copies n bytes from a source memory area to a destine memory area. The areas may overlap. None
ft_strlcpy Copies up to size - 1 characters from the NUL-terminated source string to a destine string, NUL-terminating the result. None
ft_strlcat Appends at most size - ft_strlen(destine - 1) bytes from a NUL-terminated source string to the end of a destine string. None
ft_toupper Converts a letter to its uppercase equivalent. None
ft_tolower Converts a letter to its lowercase equivalent. None
ft_strchr Returns a pointer to the first occurrence of a character. None
ft_strrchr Returns a pointer to the last occurrence of a character. None
ft_strncmp Compares two strings. None
ft_memchr Scans the initial n bytes of the memory area for the first instance of c. None
ft_memcmp Compare two memory areas, returning an integer less than, equal to, or greater than zero if the first n bytes of s1 is found, respectively, to be less than, to match, or be greater than te first n bytes of s2. None
ft_strnstr Locates the first occurrence of a null-terminated smaller string in a bigger string, where not more than len characters are searched. None
ft_atoi Converts the initial portion of a string to int. None
ft_calloc Allocates memory for an array of nmemb elements of size bytes each. The memory is set to 0. malloc()
ft_strdup Allocates and returns a new string which is a duplicate of the string s. malloc()
ft_substr Allocates and returns a substring from the string s. malloc()
ft_strjoin Allocates and returns a new string, which is the result of the concatenation of s1 and s2. malloc()
ft_strtrim Allocates and returns a copy of s1 with the characters specified in set removed from the beginning and the end of the string. malloc()
ft_split Allocates and returns an array of strings obtained by splitting s using the character c as delimiter. The string must end with a NULL pointer. malloc() free()
ft_itoa Allocates and returns a string representing the integer received as an argument. Negative numbers must be handled. malloc()
ft_strmapi Applies the function f to each character of the string s, and passing its index as first argument to create a new string resulting from successive applications of f. malloc()
ft_striteri Applies the function f on each character of the string passed as argument, passing its index as first argument. Each character is passed by address of f to be modified if necessary. None
ft_putchar_fd Outputs a character to the given file descriptor. write()
ft_putstr_fd Outputs a string to the given file descriptor. write()
ft_putendl_fd Outputs a string to the given file descriptor followed by a newline. write()
ft_putnbr_fd Outputs an integer to the given file descriptor. write()
ft_strjoinfree Allocates and returns a new string, which is the result of the concatenation of s1 and s2 and free s1. N/A
ft_printf printf() clone, with only %c, %s,%p,%x,%X,%s,%d,%i,%u,%% flags N/A
get_next_line A function that returns a line from a file, reading a maximum of BUFFER_SIZE bytes per read, but always returning the current line N/A

Kickstart

git clone git@github.com:PedroDrago/libft.git libft && rm -rf libft/README.md libft/.gitignore libft/.git libft/printscreen.png

About

🇨 A mini reproduction of libc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors