Skip to content

Ziko909/libft_42Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libft


This project gives the opportunity to recode functions that already exist in different libraries in c programming language and others that are not. the goal is to take in hand some functions that will help us in the next projects of the 42 cursus.


> About!

Mandatory Part 👨🏻‍💻

Functions from <ctype.h> library ✅

  • ft_isascii ~ is it ASCII character? 🔰
  • ft_isalnum ~ is it alphanumber character? 🔰
  • ft_isalpha ~ is it alphabetic character? 🔰
  • ft_isdigit ~ is it decimal-digit character? 🔰
  • ft_isprint ~ is it printing character? (space character inclusive) 🔰
  • ft_tolower ~ upper case to lower case letter conversion 🔰
  • ft_toupper ~ lower case to upper case letter conversion 🔰

Functions from <stdlib.h> library ✅

  • ft_atoi ~ convert ASCII string to integer 🔰
  • ft_calloc ~ memory allocation initialize with zeros 🔰

Functions from <strings.h> library ✅

Functions from <string.h> library ✅

  • ft_strlen ~ find out the length of the string 🔰
  • ft_strchr ~ locate character in string (first occurrence) 🔰
  • ft_strrchr ~ locate character in string (last occurrence) 🔰
  • ft_strnstr ~ locate a substring in a string (of limited size) 🔰
  • ft_strncmp ~ compare strings (of limited size) 🔰
  • ft_strlcpy ~ copy strings (of limited size) 🔰
  • ft_strdup ~ save a copy of a string (using malloc) 🔰
  • ft_strlcat ~ concatenate strings of limited size (second argument of the function into the first one) 🔰

Non-standard functions ✅

  • ft_putchar_fd ~ output a character to given file 🔰
  • ft_putstr_fd ~ output string to given file 🔰
  • ft_putendl_fd ~ output string to given file with newline 🔰
  • ft_putnbr_fd ~ output integer to given file 🔰
  • ft_itoa ~ convert integer to ASCII string 🔰
  • ft_substr ~ extract substring from string 🔰
  • ft_strtrim ~ trim beginning and end of string with the specified characters 🔰
  • ft_strjoin ~ concatenate two strings into a new string (using malloc) 🔰
  • ft_split ~ split string, with specified character as delimiter, into an array of strings 🔰
  • ft_strmapi ~ create new string from modifying string with specified function 🔰
  • ft_striteri ~ modify the string with the specified function if necessary. using the current character address 🔰

Bonus Part 🍩

Linked list functions ✅

  • ft_lstnew ~ create new list 🔰
  • ft_lstsize ~ count elements of a list 🔰
  • ft_lstlast ~ find last element of list 🔰
  • ft_lstadd_back ~ add new element at end of list 🔰
  • ft_lstadd_front ~ add new element at beginning of list 🔰
  • ft_lstdelone ~ delete element from list 🔰
  • ft_lstclear ~ delete sequence of elements of list from a starting point 🔰
  • ft_lstiter ~ apply function to content of all list's elements 🔰
  • ft_lstmap ~ apply function to content of all list's elements into new list 🔰

> How To Use The Library 📚

Compilation

To make a library without bonus part :

make

or

make all

To make a library with bonus part :

make bonus

Linking the library

To use libft in your code, you must add the include header to your code :

#include "$(path/of/the_libft)/Include\libft.h"

To Use The Library 📚 In Your Programe

gcc your "file .c" -lft -L path/to/libft.a -I path/to/libft.h

> Testing!

You can use these testers to test the functionality of functions :

Tripouille libft-unit-test jtoty/libfttest

> Goal!

After completing this project, I learned a lot of information about the basics of coding using C programming. Ultimately, the goal of this library is to be able to write clean code and know how to protect my functions and, of course, to familiarize myself with the library, which will help me a lot in future projects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published