Skip to content

Senedaa/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft

Libft

Overview

This project entails creating a library of 40+ functions from scratch, many of which are clones of already existing functions. This project is a good way to master the basics of C, while also beginning to learn some more complex concepts for beginners, such as linked lists.

Part 1 — C Standard Library Functions

  1. ft_isalpha(): Checks if a character is alphabetical.
  2. ft_isdigit(): Checks if a character is numerical.
  3. ft_isalnum(): Checks if a character is alphanumerical.
  4. ft_isascii(): Checks if a character is an ASCII value.
  5. ft_isprint(): Checks if a character is printable.
  6. ft_strlen(): Counts the length of a string.
  7. ft_memset(): Sets a block of memory to a specified value.
  8. ft_bzero(): Sets a block of memory to zero.
  9. ft_memcpy(): Copies memory from source to destination.
  10. ft_memmove(): Copies memory safely, handling overlaps.
  11. ft_strlcpy(): Copies a string to a buffer with size limit.
  12. ft_strlcat(): Concatenates two strings with size limit.
  13. ft_toupper(): Converts a character to uppercase.
  14. ft_tolower(): Converts a character to lowercase.
  15. ft_strchr(): Finds the first occurrence of a character in a string.
  16. ft_strrchr(): Finds the last occurrence of a character in a string.
  17. ft_strncmp(): Compares two strings up to a specified length.
  18. ft_memchr(): Searches for a character in a block of memory.
  19. ft_memcmp(): Compares two blocks of memory.
  20. ft_strnstr(): Searches for a substring within a string up to a specified length.
  21. ft_atoi(): Converts a string to an integer.
  22. ft_calloc(): Allocates and zeroes memory.
  23. ft_strdup(): Duplicates a string.

Part 2 — Additional Functions

  1. ft_substr(): Creates a substring from a given string.
  2. ft_strjoin(): Joins two strings into a new string.
  3. ft_strtrim(): Trims characters from the start and end of a string.
  4. ft_split(): Splits a string into an array of strings by a delimiter.
  5. ft_itoa(): Converts an integer to a string.
  6. ft_strmapi(): Applies a function to each character of a string to create a new string.
  7. ft_striteri(): Applies a function to each character of a string.
  8. ft_putchar_fd(): Writes a character to a file descriptor.
  9. ft_putstr_fd(): Writes a string to a file descriptor.
  10. ft_putendl_fd(): Writes a string followed by a newline to a file descriptor.
  11. ft_putnbr_fd(): Writes an integer to a file descriptor.

Part 3 — Bonus Functions

  1. ft_lstnew(): Creates a new list node.
  2. ft_lstadd_front(): Adds a node to the front of the list.
  3. ft_lstsize(): Returns the number of nodes in a list.
  4. ft_lstlast(): Returns the last node of the list.
  5. ft_lstadd_back(): Adds a node to the end of the list.
  6. ft_lstdelone(): Deletes a node and frees its content.
  7. ft_lstclear(): Deletes and frees the entire list.
  8. ft_lstiter(): Applies a function to each node's content.
  9. ft_lstmap(): Creates a new list by applying a function to each node's content.

Testers

These GitHub repositories provide testing frameworks for verifying the correctness of your implementation of the libft functions.

  1. Libft War Machine: A forked repository of libftest by jtoty, which is a comprehensive tester for the libft project.
  2. libftTester: A tester for the libft project of the 42 school.
  3. libft-unit-test: Another unit test framework for the libft project.
  4. Libftest: The original tester for the libft project created by jtoty.

These testers will help ensure that your implementation of the libft functions is correct and meets the expected standards.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published