{"id":19011374,"url":"https://github.com/colmiik/libft","last_synced_at":"2025-11-11T05:30:48.368Z","repository":{"id":194126612,"uuid":"690085739","full_name":"ColmiiK/libft","owner":"ColmiiK","description":"Beginner level library of replicated libc functions","archived":false,"fork":false,"pushed_at":"2024-02-19T15:23:54.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T21:45:32.510Z","etag":null,"topics":["42school","libft"],"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/ColmiiK.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-11T13:59:01.000Z","updated_at":"2024-07-01T10:57:55.000Z","dependencies_parsed_at":"2023-10-11T11:31:35.549Z","dependency_job_id":"1b14e5c2-7dfc-4732-8927-b05158755380","html_url":"https://github.com/ColmiiK/libft","commit_stats":null,"previous_names":["colmiik/libft"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Flibft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Flibft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Flibft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ColmiiK%2Flibft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ColmiiK","download_url":"https://codeload.github.com/ColmiiK/libft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240042753,"owners_count":19738946,"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":["42school","libft"],"created_at":"2024-11-08T19:14:11.587Z","updated_at":"2025-11-11T05:30:48.086Z","avatar_url":"https://github.com/ColmiiK.png","language":"C","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/15Galan/42_project-readmes/blob/master/banners/cursus/projects/libft-light.png?raw=true#gh-light-mode-only\" alt=\"Banner (claro)\" /\u003e\n    \u003cimg src=\"https://github.com/15Galan/42_project-readmes/blob/master/banners/cursus/projects/libft-dark.png?raw=true#gh-dark-mode-only\" alt=\"Banner (oscuro)\" /\u003e\n    \u003cbr\u003e\n    This project is about coding a C library. It will contain a lot of general purpose functions your programs will rely upon.\n    \u003cbr\u003e\n    \u003ca href='https://profile.intra.42.fr/users/alvega-g' target=\"_blank\"\u003e\n        \u003cimg alt='42 (oscuro)' src='https://img.shields.io/badge/Málaga-black?style=flat\u0026logo=42\u0026logoColor=white'/\u003e\n    \u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/score- 125%20%2F%20100-success?color=%2312bab9\u0026style=flat\" /\u003e\n    \u003cimg src=\"https://wakatime.com/badge/user/018cd069-7ab6-4658-9d62-78d9b3970dd2/project/018cd073-0acf-4efc-a0c5-b1890ca6054a.svg\" alt=\"Tiempo\" /\u003e\n\u003c/div\u003e\n\n---\n\n# Mandatory part\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eProgram name\u003c/th\u003e\n    \u003ctd\u003e\u003cem\u003elibft.a\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eTurn in files\u003c/th\u003e\n    \u003ctd\u003eMakefile, \u003ccode\u003elibft.h\u003c/code\u003e, \u003ccode\u003e*.c\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eMakefile\u003c/th\u003e\n    \u003ctd\u003e\u003cem\u003eNAME\u003c/em\u003e, \u003cem\u003eall\u003c/em\u003e, \u003cem\u003eclean\u003c/em\u003e, \u003cem\u003efclean\u003c/em\u003e, \u003cem\u003ere\u003c/em\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eExternal functions\u003c/th\u003e\n    \u003ctd\u003eDetailed below\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n\t\u003cth\u003eLibft authorized\u003c/th\u003e\n\t\u003ctd\u003en/a\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003cth\u003eDescripción\u003c/th\u003e\n    \u003ctd\u003eWrite your own library: a collection of functions\nthat will be a useful tool for your cursus.\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Technical considerations\n\n- Declaring global variables is forbidden.\n- If you need helper functions to split a more complex function, define them as static\nfunctions. This way, their scope will be limited to the appropriate file.\n- Place all your files at the root of your repository.\n- Turning in unused files is forbidden.\n- Every .c files must compile with the flags ``-Wall -Wextra -Werror``.\n- You must use the command ar to create your library. Using the ``libtool`` command\nis forbidden.\n- Your ``libft.a`` has to be created at the root of your repository.\n\n## Part 1 - Libc functions\nYou must redo a set of functions from the libc. Your functions will have the\nsame prototypes and implement the same behaviors as the originals. They must comply\nwith the way they are defined in their man. The only difference will be their names. They\nwill begin with the ’``ft_``’ prefix. For instance, ``strlen`` becomes ``ft_strlen``.\n\nYou must write your own function implementing the following original ones. They do\nnot require any external functions:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eisalpha\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eisdigit\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eisalnum\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eisascii\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eisprint\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrlen\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ememset\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003ebzero\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003ememcpy\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ememmove\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrlcpy\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrlcat\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003etoupper\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003etolower\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrchr\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003estrrchr\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrncmp\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003ememchr\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003ememcmp\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003estrnstr\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eatoi\u003c/code\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nIn order to implement the two following functions, you will use ``malloc()``:\n- ``calloc``\n- ``strdup``\n\n## Part 2 - Additional functions\n\nIn this second part, you must develop a set of functions that are either not in the libc,\nor that are part of it but in a different form.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eNombre de la función\u003c/th\u003e\n    \u003cth\u003eDescripción\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_substr()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllocates and returns a substring\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_strjoin()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllocates and returns a new string as a result of concatenation.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_strtrim()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllocates and returns a copy of a string with all specified characters of a 'set' string removed from the beginning and end.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_split()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllocates and returns an array of strings obtained by splitting a string by a delimiter.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_itoa()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAllocates and returns a string representing the integer recieved as an arguments. Negative numbers must be handled.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_strmapi()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eApply a function to all characters of a string.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_striteri()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eApply a function to all characters of a string with the index of a character\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_putchar_fd()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eOutputs a character to the specified file descriptor. \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_putstr_fd()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eOutputs a string to the specified file descriptor.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_putendl_fd()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eOutputs a string to the specified file descriptor, adding a newline at the end.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_putnbr_fd()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eOutputs a number to the specified file descriptor.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# Bonus part\n\nFunctions to manipulate memory and strings is very useful. But you will soon discover\nthat manipulating lists is even more useful. \u003cbr\u003e\nYou have to use the following structure to represent a node of your list. Add its\ndeclaration to your ``libft.h`` file:\n\n```c\ntypedef struct s_list\n{\n    void            *content;\n    struct s_list   *next;\n} t_list;\n```\nThe members of the t_list struct are:\n- content: The data contained in the node.\n``void *`` allows to store any kind of data.\n- next: The address of the next node, or ``NULL`` if the next node is the last one.\nIn your Makefile, add a make bonus rule to add the bonus functions to your ``libft``.a.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eNombre de la función\u003c/th\u003e\n    \u003cth\u003eDescripción\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstnew()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eCreates a new node with the specified content, pointing \u003ccode\u003enext\u003c/code\u003e to \u003ccode\u003eNULL\u003c/code\u003e.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstadd_front()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAdds a new node at the beginning of the list.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstsize()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eCounts the number of nodes in a list.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstlast()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eReturns the last node of the list.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstadd_back()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eAdds the node ’new’ at the end of the list.\n\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstdelone()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eRemoves a node from the list.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstclear()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eDeletes a list.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstiter()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eIterate through the list and apply a function to each node.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ccode\u003eft_lstmap()\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003eIterate through the list and apply a function to each node, deleting the progress if failed.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolmiik%2Flibft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolmiik%2Flibft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolmiik%2Flibft/lists"}