{"id":20255935,"url":"https://github.com/publioelio/school-42-libft","last_synced_at":"2025-06-23T18:07:48.460Z","repository":{"id":60699539,"uuid":"540563287","full_name":"PublioElio/School-42-libft","owner":"PublioElio","description":"A repository with all archives for the proyect libft in the School 42 core cursus. It's a custom-made library :books: of useful functions in C language  :wrench:","archived":false,"fork":false,"pushed_at":"2022-10-26T12:02:54.000Z","size":1420,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T19:08:39.306Z","etag":null,"topics":["42cursus","42projects","42school","c-language","libft42","library","makefile","school-42-malaga"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PublioElio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-23T18:09:58.000Z","updated_at":"2025-04-04T18:00:08.000Z","dependencies_parsed_at":"2023-01-20T13:31:46.195Z","dependency_job_id":null,"html_url":"https://github.com/PublioElio/School-42-libft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PublioElio/School-42-libft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PublioElio%2FSchool-42-libft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PublioElio%2FSchool-42-libft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PublioElio%2FSchool-42-libft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PublioElio%2FSchool-42-libft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PublioElio","download_url":"https://codeload.github.com/PublioElio/School-42-libft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PublioElio%2FSchool-42-libft/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261528671,"owners_count":23172753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42cursus","42projects","42school","c-language","libft42","library","makefile","school-42-malaga"],"created_at":"2024-11-14T10:42:09.536Z","updated_at":"2025-06-23T18:07:48.426Z","avatar_url":"https://github.com/PublioElio.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"header\" align=\"center\"\u003e\n  \u003cimg src=\"https://media.giphy.com/media/ztl9x7JlhSlU4MWD6h/giphy.gif\" width=\"200\"/\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003elibft\u003c/h1\u003e\n\n\u003e School 42 Málaga cursus project\n\nThis repository contains all archives for the project __libft__ in the __School 42 Málaga core cursus__. It's a custom-made library of useful functions in __C language__. The repository includes the `Makefile` and the `libft.h` library.\n\n\u003ch2 align=\"center\"\u003e\n\t\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#index\"\u003eIndex\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#instructions\"\u003eInstructions\u003c/a\u003e\n\t\u003cspan\u003e · \u003c/span\u003e\n\t\u003ca href=\"#testing\"\u003eTesting\u003c/a\u003e\n\u003c/h2\u003e\n\n## About\n\nThis project is a __C library__ of useful functions that are allowed to be used in future __School 42 cursus__ projects. With access to this library, the coding proccess in incoming projects will be more effective. The aim of rewrite this functions is to get a better understanding of them, and get a whide range of utilities for the next projects. [You can find more information in the subject](https://github.com/PublioElio/School-42-libft/blob/main/libft_subject.pdf). As it's specified in the subjet, all the archives are in the same folder.\n\nThe code in this repository follows [the rules of the Norminette](https://github.com/PublioElio/School42-Piscina-agosto-2022/blob/main/norme.es.pdf).\n\n## Index\n### Functions from `\u003cctype.h\u003e` library\n* [`ft_isascii`](https://github.com/PublioElio/School-42-libft/blob/main/ft_isascii.c) - Test a character to see if it's a 7-bit ASCII character.\n* [`ft_isalpha`](https://github.com/PublioElio/School-42-libft/blob/main/ft_isalpha.c) - Test a character to see if it's alphabetic.\n* [`ft_isdigit`](https://github.com/PublioElio/School-42-libft/blob/main/ft_isdigit.c) - Test a character to see if it's a decimal digit.\n* [`ft_isalnum`](https://github.com/PublioElio/School-42-libft/blob/main/ft_isalnum.c) - Test a character to see if it's alphanumeric.\n* [`ft_isprint`](https://github.com/PublioElio/School-42-libft/blob/main/ft_isprint.c) - Test a character to see if it's any printable character, including a space.\n* [`ft_tolower`](https://github.com/PublioElio/School-42-libft/blob/main/ft_tolower.c) - Convert a character to lowercase.\n* [`ft_toupper`](https://github.com/PublioElio/School-42-libft/blob/main/ft_toupper.c) - Convert a character to uppercase.\n\n### Functions from `\u003cstdlib.h\u003e` library\n* [`ft_atoi`](https://github.com/PublioElio/School-42-libft/blob/main/ft_atoi.c) - Convert ASCII string to integer.\n* [`ft_calloc`](https://github.com/PublioElio/School-42-libft/blob/main/ft_calloc.c) - Allocate space for an array and initializes it to 0. This function and `malloc` return a void pointer, that had no associated data type with it. A void pointer can hold address of any type and can be typecasted to any type.\n\n### Functions from `\u003cstrings.h\u003e` library\n* [`ft_bzero`](https://github.com/PublioElio/School-42-libft/blob/main/ft_bzero.c) - Set the first part of an object to null bytes (filling it with zeroes).\n* [`ft_memset`](https://github.com/PublioElio/School-42-libft/blob/main/ft_memset.c) - Set memory to a given value.\n* [`ft_memchr`](https://github.com/PublioElio/School-42-libft/blob/main/ft_memchr.c) - Find the first occurrence of a character in a buffer (locate byte in byte string).\n* [`ft_memcmp`](https://github.com/PublioElio/School-42-libft/blob/main/ft_memcmp.c) - Compare the bytes in two buffers.\n* [`ft_memmove`](https://github.com/PublioElio/School-42-libft/blob/main/ft_memmove.c) - Copy bytes from one buffer to another, handling overlapping memory correctly.\n* [`ft_memcpy`](https://github.com/PublioElio/School-42-libft/blob/main/ft_memcpy.c) - Copy bytes from one buffer to another.\n\n### Functions from `\u003cstring.h\u003e` library\n* [`ft_strlen`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strlen.c) - Get the length of a string.\n* [`ft_strchr`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strchr.c) - Find the first occurrence of a character in a string.\n* [`ft_strrchr`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strrchr.c) - Find the last occurrence of a character in a string.\n* [`ft_strnstr`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strnstr.c) - Locate a substring in a string.\n* [`ft_strncmp`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strncmp.c) - Compare two strings, up to a given length.\n* [`ft_strdup`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strdup.c) - Create a duplicate of a string, using `malloc`.\n* [`ft_strlcpy`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strlcpy.c) - Size-bounded string copy.\n* [`ft_strlcat`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strlcat.c) - Size-bounded string concatenation.\n\n### Non-standard functions\n* [`ft_itoa`](https://github.com/PublioElio/School-42-libft/blob/main/ft_itoa.c) - Convert integer to ASCII string.\n* [`ft_substr`](https://github.com/PublioElio/School-42-libft/blob/main/ft_substr.c) - Get a substring from string.\n* [`ft_strtrim`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strtrim.c) - Trim beginning and end of string with the specified substring.\n* [`ft_strjoin`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strjoin.c) - Concatenate two strings into a new string, using `calloc`.\n* [`ft_split`](https://github.com/PublioElio/School-42-libft/blob/main/ft_split.c) - Split string, with specified character as delimiter, into an array of strings.\n* [`ft_strmapi`](https://github.com/PublioElio/School-42-libft/blob/main/ft_strmapi.c) - Create new string from a string modified with a specified function.\n* [`ft_striteri`](https://github.com/PublioElio/School-42-libft/blob/main/ft_striteri.c) - Modify a string with a given function.\n* [`ft_putchar_fd`](https://github.com/PublioElio/School-42-libft/blob/main/ft_putchar_fd.c) - Output a character to given file.\n* [`ft_putstr_fd`](https://github.com/PublioElio/School-42-libft/blob/main/ft_putstr_fd.c) - Output string to given file.\n* [`ft_putendl_fd`](https://github.com/PublioElio/School-42-libft/blob/main/ft_putendl_fd.c) - Output string to given file with newline.\n* [`ft_putnbr_fd`](https://github.com/PublioElio/School-42-libft/blob/main/ft_putnbr_fd.c) - Output integer to given file.\n\n### Linked list functions *(bonus)*\n* [`ft_lstnew`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstnew_bonus.c) - Create new list.\n* [`ft_lstsize`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstsize_bonus.c) - Count elements of a list.\n* [`ft_lstlast`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstlast_bonus.c) - Find last element of list.\n* [`ft_lstadd_back`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstadd_back_bonus.c) - Add new element at end of list.\n* [`ft_lstadd_front`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstadd_front_bonus.c) - Add new element at beginning of list.\n* [`ft_lstdelone`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstdelone_bonus.c) - Delete element from list.\n* [`ft_lstclear`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstclear_bonus.c) - Delete sequence of elements of list from a starting point.\n* [`ft_lstiter`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstiter_bonus.c) - Apply function to content of all list's elements.\n* [`ft_lstmap`](https://github.com/PublioElio/School-42-libft/blob/main/ft_lstmap_bonus.c) - Apply function to content of all list's elements into new list.\n\n## Requirements\nThe library is written in __C language__ and needs the `gcc` compiler, with `\u003cstdlib.h\u003e` and `\u003cunistd.h\u003e` standard libraries to run.\n\n## Instructions\n\n### 1. Compiling the library\n\nTo compile the library, go to its path and run:\n\nFor __basic__ functions:\n```\n$ make\n```\n\nFor __bonus__ functions:\n```\n$ make bonus\n```\n\n### 2. Cleaning all binary (.o) and executable files (.a)\n\nTo delete all files generated with make, go to the path and run:\n```\n$ make fclean\n```\n\n### 3. Using it in your code\n\nTo use the library functions in your code, simply include this header:\n```\n#include \"libft.h\"\n```\n\n## Testing\nThis library have been tested with [Francinette](https://github.com/xicodomingues/francinette).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpublioelio%2Fschool-42-libft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpublioelio%2Fschool-42-libft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpublioelio%2Fschool-42-libft/lists"}