Skip to content

Shimon42/Libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft

Implementations

Conversion

  • ft_inrad: convert an angle from degres to radians
  • ft_indeg: convert an angle from radians to degres
  • ft_atoi: convert a string into an integer
  • ft_itoa: convert an integer into a string (base 10)
  • ft_itoab: convert an integer into a string using any base
  • ft_str_to_int_tab: convert a string into an array of integers

Text

  • ft_putchar_fd: write a character to a file descriptor
  • ft_putendl_fd: write a string followed by a newline to a file descriptor
  • ft_puthex: write an integer in hexadecimal into the standard output
  • ft_putihex: write an integer in hexadecimal into the standard output
  • ft_putint: write an integer into the standard output
  • ft_putnbr: write an integer into the standard output
  • ft_putnstr: write a string into the standard output
  • ft_putstr: write a string into the standard output
  • ft_putstr_fd: write a string to a file descriptor
  • ft_putunbr: write an unsigned integer into the standard output

File

  • get_next_line: read a line from a file descriptor

Linked list

  • ft_lstadd_back: add a new element at the end of a list
  • ft_lstadd_front: add a new element at the beginning of a list
  • ft_lstclear: delete and free a list
  • ft_lstdelone: delete and free an element of a list
  • ft_lstiter: apply a function to each element of a list
  • ft_lstlast: return the last element of a list
  • ft_lstmap: apply a function to each element of a list and return a new list
  • ft_lstnew: create a new element
  • ft_lstsize: return the number of elements in a list

Maths

  • ft_abs: return the absolute value of an integer

Memory

  • ft_bzero: write zeroes to a byte string
  • ft_calloc: allocate memory and set it to zero
  • ft_memccpy: copy a string until a character is found
  • ft_memchr: locate a character in a string
  • ft_memcmp: compare two strings
  • ft_memcpy: copy a string
  • ft_memmove: copy a string
  • ft_memset: write a character to a string

Numbers

  • ft_hexlen: return the length of an integer in hexadecimal
  • ft_nbrslen: return the length of an integer

Strings

  • ft_findchar: find a character in a string
  • ft_isalnum: check if a character is alphanumeric
  • ft_isalpha: check if a character is alphabetic
  • ft_isascii: check if a character is in the ASCII table
  • ft_isdigit: check if a character is a digit
  • ft_isprint: check if a character is printable
  • ft_split: split a string into an array of strings
  • ft_strchr: locate a character in a string
  • ft_strdup: duplicate a string
  • ft_strjoin: concatenate two strings
  • ft_strlcat: concatenate two strings
  • ft_strlcpy: copy a string
  • ft_strlen: return the length of a string
  • ft_strmapi: apply a function to each character of a string
  • ft_strncmp: compare two strings
  • ft_strnstr: locate a substring in a string
  • ft_strrchr: locate a character in a string
  • ft_strtrim: remove characters from the beginning and the end of a string
  • ft_strupper: convert a string to uppercase
  • ft_substr: extract a substring from a string
  • ft_tolower: convert a character to lowercase
  • ft_toupper: convert a character to uppercase