{"id":19053260,"url":"https://github.com/jotavare/libft","last_synced_at":"2025-04-24T02:44:24.865Z","repository":{"id":155284588,"uuid":"583765070","full_name":"jotavare/libft","owner":"jotavare","description":"Create my own library and redo a set of functions from the C standard library.","archived":false,"fork":false,"pushed_at":"2024-06-26T23:01:16.000Z","size":1506,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-28T02:37:03.732Z","etag":null,"topics":["c","dynamic-array","gdb","libft","linked-list","makefile","malloc","norminette","standard-library","string-manipulation","string-matching","valgrind"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"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/jotavare.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":"2022-12-30T21:01:33.000Z","updated_at":"2024-06-26T23:06:53.000Z","dependencies_parsed_at":"2024-06-27T02:29:01.002Z","dependency_job_id":"444c2be8-a5c4-491e-9b95-109ea9aea84b","html_url":"https://github.com/jotavare/libft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Flibft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Flibft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Flibft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jotavare%2Flibft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jotavare","download_url":"https://codeload.github.com/jotavare/libft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223768128,"owners_count":17199306,"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":["c","dynamic-array","gdb","libft","linked-list","makefile","malloc","norminette","standard-library","string-manipulation","string-matching","valgrind"],"created_at":"2024-11-08T23:29:50.952Z","updated_at":"2024-11-08T23:29:51.379Z","avatar_url":"https://github.com/jotavare.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/jotavare/jotavare/blob/main/42/banners/piscine_and_common_core/github_piscine_and_common_core_banner_libft.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/status-finished-success?color=%2312bab9\u0026style=flat-square\"/\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/evaluated-24%20%2F%2011%20%2F%202022-success?color=%2312bab9\u0026style=flat-square\"/\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/score-125%20%2F%20100-success?color=%2312bab9\u0026style=flat-square\"/\u003e\n\t\u003cimg src=\"https://img.shields.io/github/languages/top/jotavare/libft?color=%2312bab9\u0026style=flat-square\"/\u003e\n\t\u003cimg src=\"https://img.shields.io/github/last-commit/jotavare/libft?color=%2312bab9\u0026style=flat-square\"/\u003e\n\t\u003ca href='https://www.linkedin.com/in/joaoptoliveira' target=\"_blank\"\u003e\u003cimg alt='Linkedin' src='https://img.shields.io/badge/LinkedIn-100000?style=flat-square\u0026logo=Linkedin\u0026logoColor=white\u0026labelColor=0A66C2\u0026color=0A66C2'/\u003e\u003c/a\u003e\n\t\u003ca href='https://profile.intra.42.fr/users/jotavare' target=\"_blank\"\u003e\u003cimg alt='42' src='https://img.shields.io/badge/Porto-100000?style=flat-square\u0026logo=42\u0026logoColor=white\u0026labelColor=000000\u0026color=000000'/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"#about\"\u003eAbout\u003c/a\u003e •\n\t\u003ca href=\"#how-to-use\"\u003eHow to use\u003c/a\u003e •\n\t\u003ca href=\"#mandatory\"\u003eMandatory\u003c/a\u003e •\n\t\u003ca href=\"#bonus\"\u003eBonus\u003c/a\u003e •\n\t\u003ca href=\"#norminette\"\u003eNorminette\u003c/a\u003e •\n\t\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n\t\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n## ABOUT\nThe first project at 42, libft, involves learning how the standard functions of C programming work by writing them from scratch and creating a personal library. This project is vital as the library will be used in future assignments at 42.\n\nIf you're a 42 student, it's highly recommended that you go through the process of writing your code and testing it yourself rather than copying and pasting code that you only partially understand. If you've completed your piscine, there's no reason why you couldn't tackle this project on your own! Be patient and thorough.\n\n- [Subject](https://github.com/jotavare/libft/blob/master/subject/en_subject_libft.pdf) `PDF`\n- [References](https://github.com/jotavare/42-resources#00-libft) `GitHub`\n\n## HOW TO USE\n#### 1º - Clone the repository\n```bash\ngit clone git@github.com:jotavare/libft.git\n```\n\n#### 2º - Enter the project folder and run `make`\n```bash\ncd libft/libft\nmake\n```\n\n#### 3º - To use in your code, include the header\n```c\n#include \"libft.h\"\n```\n\n#### MAKEFILE RULES\n\n`make` - Compile libft **mandatory** files.\n\n`make bonus` - Compile libft **bonus** files.\n\n`make all` - Compile **mandatory** + **bonus** files.\n\n`make clean` - Delete all .o (object files) files.\n\n`make fclean` - Delete all .o (object file) and .a (executable) files.\n\n`make re` - Use rules `fclean` + `all`.\n\n## MANDATORY\n\u003e The mandatory functions in libft include both functions from the standard C library and other functions that are useful for character, string, and memory manipulation. These **34 mandatory functions** are essential to achieving a **grade of 100**.\n\n#### Check and manipulate characters:\n| Function | Description |\n| :- | :- |\n| `ft_isalpha` | Alphabetic character test. |\n| `ft_isdigit` | Decimal-digit character test. |\n| `ft_isalnum` | Alphanumeric character test. |\n| `ft_isascii` | Test for ASCII character. |\n| `ft_toupper` | Lower case to upper case letter conversion. |\n| `ft_tolower` | Upper case to lower case letter conversion. |\n\n#### Manipulate strings:\n| Function | Description |\n| :- | :- |\n| `ft_strlen`   | Find the length of the string. |\n| `ft_strlcpy`  | Size-bounded string copying. |\n| `ft_strlcat`  | Size-bounded string concatenation. |\n| `ft_strchr`   | Locate the character in the string (first occurrence). |\n| `ft_strrchr`  | Locate the character in the string (last occurrence). |\n| `ft_strncmp`  | Compare strings (size-bounded). |\n| `ft_strnstr`  | Locate a substring in a string (size-bounded) |\n| `ft_substr`   | Extract substring from a string. |\n| `ft_strjoin`  | Concatenate two strings into a new string (with malloc). |\n| `ft_strtrim`  | Trim the beginning and end of the string with the specified characters. |\n| `ft_split`    | Split string, with specified character as delimiter, into an array of strings. |\n| `ft_strmapi`  | Create a new string by modifying the string with a specified function. |\n| `ft_striteri` | Iterates through a string, enabling character and index manipulation. |\n\n#### Manipulate memory:\n| Function | Description |\n| :- | :- |\n| `ft_calloc`  | Memory allocation. |\n| `ft_memset`  | Write a byte to a byte string. |\n| `ft_bzero`   | Write zeroes to a byte string. |\n| `ft_memcpy`  | Copy memory area. |\n| `ft_memmove` | Copy byte string. |\n| `ft_memchr`  | Locate byte in byte string. |\n| `ft_memcmp`  | Compare byte string. |\n| `ft_strdup`  | Save a copy of a string (with malloc). |\n\n#### Manipulate numbers:\n| Function | Description |\n| :- | :- |\n| `ft_atoi` | Convert the ASCII string to an integer. |\n| `ft_itoa` | Convert integer to ASCII string. |\n\n#### Write to a file descriptor:\n| Function | Description |\n| :- | :- |\n| `ft_putchar_fd` | Output a character to the given file. |\n| `ft_putstr_fd`  | Output string to the given file. |\n| `ft_putendl_fd` | Output string to given file with newline. |\n| `ft_putnbr_fd`  | Output integer to the given file. |\n\n## BONUS\n\u003e The bonus functions in libft are focused on list manipulation and are worth an additional 25 towards the final grade. To achieve a **grade of 125**, **all 9 bonus functions and 34 mandatory functions** must be completed accurately.\n\n| Function | Description |\n| :- | :- |\n| `ft_lstnew`       | Create new list. |\n| `ft_lstadd_front` | Add a new element at the beginning of the list. |\n| `ft_lstadd_back`  | Add a new element at the end of the list. |\n| `ft_lstsize`      | Count elements of a list. |\n| `ft_lstlast`      | Find the last element of the list. |\n| `ft_lstdelone`    | Delete element from the list. |\n| `ft_lstclear`     | Delete the sequence of elements of the list from a starting point. |\n| `ft_lstiter`      | Apply function to the content of all list elements. |\n| `ft_lstmap`       | Apply function to the content of all list elements into a new list. |\n\n## NORMINETTE\n\u003e At 42 School, it is expected that almost every project is written following the Norm, which is the coding standard of the school.\n\n```\n- No for, do...while, switch, case, goto, ternary operators, or variable-length arrays allowed;\n- Each function must be a maximum of 25 lines, not counting the function's curly brackets;\n- Each line must be at most 80 columns wide, with comments included;\n- A function can take 4 named parameters maximum;\n- No assigns and declarations in the same line (unless static);\n- You can't declare more than 5 variables per function;\n- ...\n```\n\n* [42 Norms](https://github.com/42School/norminette/blob/master/pdf/en.norm.pdf) - Information about 42 code norms. `PDF`\n* [Norminette](https://github.com/42School/norminette) - Tool to respect the code norm, made by 42. `GitHub`\n* [42 Header](https://github.com/42Paris/42header) - 42 header for Vim. `GitHub`\n\n## CONTRIBUTING\n\nIf you find any issues or have suggestions for improvements, feel free to fork the repository and open an issue or submit a pull request.\n\n## LICENSE\n\nThis project is available under the MIT License. For further details, please refer to the [LICENSE](https://github.com/jotavare/libft/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavare%2Flibft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjotavare%2Flibft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjotavare%2Flibft/lists"}