{"id":22153185,"url":"https://github.com/dpetrosy/42-libft","last_synced_at":"2025-03-24T13:42:23.978Z","repository":{"id":218588802,"uuid":"746845667","full_name":"dpetrosy/42-Libft","owner":"dpetrosy","description":"42 School's first project: libft. The goal is to create our own C library for use in future projects.","archived":false,"fork":false,"pushed_at":"2024-04-03T13:22:18.000Z","size":2976,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T18:46:42.658Z","etag":null,"topics":["42","42-cursus","42-libft","42-school","42born2code","42cursus","42libft","42projects","42school","42yerevan","c","c-programming","libft","libft-42","libft42","library","makefile"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpetrosy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T19:35:47.000Z","updated_at":"2024-02-24T18:30:37.000Z","dependencies_parsed_at":"2024-01-24T17:35:07.716Z","dependency_job_id":"b2e48275-ab37-46e1-9039-e0b6f8a677f6","html_url":"https://github.com/dpetrosy/42-Libft","commit_stats":null,"previous_names":["dpetrosy/42-libft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Libft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Libft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Libft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Libft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpetrosy","download_url":"https://codeload.github.com/dpetrosy/42-Libft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245283849,"owners_count":20590299,"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":["42","42-cursus","42-libft","42-school","42born2code","42cursus","42libft","42projects","42school","42yerevan","c","c-programming","libft","libft-42","libft42","library","makefile"],"created_at":"2024-12-02T01:17:21.856Z","updated_at":"2025-03-24T13:42:23.957Z","avatar_url":"https://github.com/dpetrosy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Logo --\u003e\n  \u003ca href=\"https://github.com/dpetrosy/42-Libft\"\u003e\n  \u003cimg src=\"README_files/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Project Name --\u003e\n  \u003ch1\u003eLibft Project\u003c/h1\u003e\n\n  \u003c!-- Short Description --\u003e\n  \u003cp align=\"center\"\u003e\n\t  \u003cb\u003e42 Yerevan Libft\u003c/b\u003e\u003cbr\u003e\n\t  For further information about 42cursus and its projects, please refer to \u003ca href=\"https://github.com/dpetrosy/42cursus\"\u003e\u003cb\u003e42cursus repo\u003c/b\u003e\u003c/a\u003e.\n  \u003c/p\u003e\n\n  \u003c!-- Badges --\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/badge/score-125%20%2F%20100-success?style=for-the-badge\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/repo-size/dpetrosy/42-Libft?style=for-the-badge\u0026logo=github\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/count/dpetrosy/42-Libft?style=for-the-badge\u0026logo=\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/top/dpetrosy/42-Libft?style=for-the-badge\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/dpetrosy/42-Libft?style=for-the-badge\" /\u003e\n  \u003c/p\u003e\n\n  \u003ch3\u003e\n      \u003ca href=\"#-about-project\"\u003e📜 About Project\u003c/a\u003e\n    \u003cspan\u003e · \u003c/span\u003e\n      \u003ca href=\"#-functions-list\"\u003e📑 Functions List\u003c/a\u003e\n    \u003cspan\u003e · \u003c/span\u003e\n      \u003ca href=\"#-usage\"\u003e👨‍💻 Usage\u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n---\n\n## 📜 About Project\n\n\u003e _The aim of this project is to code a C library regrouping usual functions that you'll be allowed to use in all your other projects._\n\nFor detailed information, refer to the [**subject of this project**](README_files/libft_subject.pdf).\n\n\t🚀 TLDR: this project consists of coding basic C functions (see below), which are then\n\tcompiled into a library for use in other projects of the cursus.\n\n\u003e [!NOTE]  \n\u003e Because of 42 School norm requirements:\n\u003e * Each function can't have more than 25 lines of code.\n\u003e * All variables are declared and aligned at the top of each function.\n\u003e * Project should be created just with allowed functions otherwise it's cheating.\n\n## 📑 Functions List\n\n### Functions from `\u003cctype.h\u003e` library\n* [`ft_isascii`](libft/ft_isascii.c)\t- test for ASCII character.\n* [`ft_isalnum`](libft/ft_isalnum.c)\t- alphanumeric character test.\n* [`ft_isalpha`](libft/ft_isalpha.c)\t- alphabetic character test.\n* [`ft_isdigit`](libft/ft_isdigit.c)\t- decimal-digit character test.\n* [`ft_isprint`](libft/ft_isprint.c)\t- printing character test (space character inclusive).\n* [`ft_tolower`](libft/ft_tolower.c)\t- upper case to lower case letter conversion.\n* [`ft_toupper`](libft/ft_toupper.c)\t- lower case to upper case letter conversion.\n\n### Functions from `\u003cstdlib.h\u003e` library\n* [`ft_atoi`](libft/ft_atoi.c)\t\t  - convert ASCII string to integer.\n* [`ft_calloc`](libft/ft_calloc.c)\t- memory allocation.\n\n### Functions from `\u003cstrings.h\u003e` library\n* [`ft_bzero`](libft/ft_bzero.c)\t\t  - write zeroes to a byte string.\n* [`ft_memset`](libft/ft_memset.c)\t\t- write a byte to a byte string.\n* [`ft_memchr`](libft/ft_memchr.c)\t\t- locate byte in byte string.\n* [`ft_memcmp`](libft/ft_memcmp.c)\t\t- compare byte string.\n* [`ft_memmove`](libft/ft_memmove.c)\t- copy byte string.\n* [`ft_memcpy`](libft/ft_memcpy.c)\t\t- copy memory area.\n\n### Functions from `\u003cstring.h\u003e` library\n* [`ft_strlen`](libft/ft_strlen.c)\t\t  - find length of string.\n* [`ft_strchr`](libft/ft_strchr.c)\t\t  - locate character in string (first occurrence).\n* [`ft_strrchr`](libft/ft_strrchr.c)\t  - locate character in string (last occurence).\n* [`ft_strnstr`](libft/ft_strnstr.c)\t  - locate a substring in a string (size-bounded).\n* [`ft_strncmp`](libft/ft_strncmp.c)\t\t  - compare strings (size-bounded).\n* [`ft_strdup`](libft/ft_strdup.c)\t\t\t- save a copy of a string (with malloc).\n* [`ft_strlcpy`](libft/ft_strlcpy.c)\t\t- size-bounded string copying.\n* [`ft_strlcat`](libft/ft_strlcat.c)\t\t- size-bounded string concatenation.\n\n### Non-standard functions\n* [`ft_putchar_fd`](libft/ft_putchar_fd.c)\t- output a character to given file.\n* [`ft_putstr_fd`](libft/ft_putstr_fd.c)\t\t- output string to given file.\n* [`ft_putendl_fd`](libft/ft_putendl_fd.c)\t- output string to given file with newline.\n* [`ft_putnbr_fd`](libft/ft_putnbr_fd.c)\t\t- output integer to given file.\n* [`ft_itoa`](libft/ft_itoa.c)\t\t\t\t\t    - convert integer to ASCII string.\n* [`ft_substr`](libft/ft_substr.c)\t\t\t\t  - extract substring from string.\n* [`ft_strtrim`](libft/ft_strtrim.c)\t\t\t  - trim beginning and end of string with the specified characters.\n* [`ft_strjoin`](libft/ft_strjoin.c)\t\t\t  - concatenate two strings into a new string (with malloc).\n* [`ft_split`](libft/ft_split.c)\t\t\t\t    - split string, with specified character as delimiter, into an array of strings.\n* [`ft_strmapi`](libft/ft_strmapi.c)\t\t\t  - create new string from modifying string with specified function.\n* [`ft_striteri`](libft/ft_striteri.c)\t\t\t  - applies the specific function on each character of the string.\n\n### Linked list functions\n* [`ft_lstnew`](libft/ft_lstnew.c)\t\t\t\t      - create new list.\n* [`ft_lstsize`](libft/ft_lstsize.c)\t\t\t      - count elements of a list.\n* [`ft_lstlast`](libft/ft_lstlast.c)\t\t\t      - find last element of list.\n* [`ft_lstadd_back`](libft/ft_lstadd_back.c)\t  - add new element at end of list.\n* [`ft_lstadd_front`](libft/ft_lstadd_front.c)\t- add new element at beginning of list.\n* [`ft_lstdelone`](libft/ft_lstdelone.c)\t\t    - delete element from list.\n* [`ft_lstclear`](libft/ft_lstclear.c)\t\t\t    - delete sequence of elements of list from a starting point.\n* [`ft_lstiter`](libft/ft_lstiter.c)\t\t\t      - apply function to content of all list's elements.\n* [`ft_lstmap`](libft/ft_lstmap.c)\t\t\t\t      - apply function to content of all list's elements into new list.\n\n## 👨‍💻 Usage\n### Requirements\n\nThe library is written in C language and thus needs the **gcc compiler** and some standard **C libraries** to run.\n\n### Instructions\n\n**1. Compiling the library**\n\nTo compile the library, run:\n\n```shell\n$ cd path/to/libft \u0026\u0026 make\n```\n\n**2. Using it in your code**\n\nTo use the library functions in your code, simply include its header:\n\n```C\n#include \"libft.h\"\n```\n\nand, when compiling your code, add the required flags:\n\n```shell\n-lft -L path/to/libft.a -I path/to/libft.h\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpetrosy%2F42-libft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpetrosy%2F42-libft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpetrosy%2F42-libft/lists"}