{"id":19483421,"url":"https://github.com/librity/ft_libft","last_synced_at":"2025-04-25T16:32:08.963Z","repository":{"id":47481365,"uuid":"335484758","full_name":"librity/ft_libft","owner":"librity","description":"42 São Paulo - Libft","archived":false,"fork":false,"pushed_at":"2023-01-30T22:56:53.000Z","size":481,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-04-01T06:46:56.773Z","etag":null,"topics":["42","42born2code","42saopaulo","42school","c","cursus","ft-libft","libft","norminette","tests"],"latest_commit_sha":null,"homepage":"https://www.42sp.org.br/","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/librity.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}},"created_at":"2021-02-03T02:30:26.000Z","updated_at":"2023-03-04T17:56:56.000Z","dependencies_parsed_at":"2023-01-31T09:46:02.284Z","dependency_job_id":null,"html_url":"https://github.com/librity/ft_libft","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_libft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_libft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_libft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/librity%2Fft_libft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/librity","download_url":"https://codeload.github.com/librity/ft_libft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224007860,"owners_count":17240294,"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","42born2code","42saopaulo","42school","c","cursus","ft-libft","libft","norminette","tests"],"created_at":"2024-11-10T20:15:01.818Z","updated_at":"2024-11-10T20:15:02.888Z","avatar_url":"https://github.com/librity.png","language":"C","readme":"\u003ch3 align=\"center\"\u003e42 São Paulo - libft\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![42 São Paulo](https://img.shields.io/badge/42-SP-1E2952)\n![License](https://img.shields.io/github/license/librity/ft_libft?color=yellow)\n![Code size in bytes](https://img.shields.io/github/languages/code-size/librity/ft_libft?color=blue)\n![Lines of code](https://img.shields.io/tokei/lines/github/librity/ft_libft?color=blueviolet)\n![Top language](https://img.shields.io/github/languages/top/librity/ft_libft?color=ff69b4)\n![Last commit](https://img.shields.io/github/last-commit/librity/ft_libft?color=orange)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build](https://github.com/librity/ft_libft/actions/workflows/build.yml/badge.svg)](https://github.com/librity/ft_libft/actions/workflows/build.yml)\n[![Norminette v3](https://github.com/librity/ft_libft/actions/workflows/norminette_v3.yml/badge.svg)](https://github.com/librity/ft_libft/actions/workflows/norminette_v3.yml)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e A reasonably-complete implementation of \u003ccode\u003estdlib.h\u003c/code\u003e,\nand much much more.\n  \u003cbr\u003e\n\u003c/p\u003e\n\n---\n\n## 📜 Table of Contents\n\n- [About](#about)\n- [Getting Started](#getting_started)\n- [Usage](#usage)\n- [Tests](#tests)\n- [To Do](#todo)\n- [Github Actions](#github_actions)\n- [42 São Paulo](#ft_sp)\n\n## 🧐 About \u003ca name = \"about\"\u003e\u003c/a\u003e\n\nThis was my first project at 42 São Paulo:\nan implementation of many `stdlib.h` functions from scratch.\n\nI've used it on most projects so far.\nI learned about memory manipulations, string utilities and linked lists.\nAs a developer I've been using these functions for years\nin some form or another, yet I had no idea how they really work.\nFiguring them out was an initiation of sorts.\n\nIt has over 300 functions so far,\nincluding a heap-less `printf` that handles `float`s and `long double`s.\nAll functions have a doxygen-style documentation comment,\nand most have an example main.\nI prioritize modularity and readability:\nsmall functions with catchy names that do one thing well.\n\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\n\n### ⚙️ Prerequisites\n\nAll you need is a shell and a C compiler like `gcc` or `clang`.\n\n### 🖥️ Installing\n\nTo compile the entire thing just clone the repo and run `make`:\n\n```bash\n$ git clone https://github.com/librity/ft_libft.git\n$ cd ft_libft\n$ make\n```\n\nThis will generate a `libft.a` archive, which you can compile with\nany of the example files:\n\n```bash\n$ cp examples/ft_itoa.c examples/example.c\n$ gcc -g -I ./includes examples/example.c libft.a\n$ ./a.out\n```\n\n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n\nYou can call most `stdlib.h` functions as you normally would\nbut with the prefix `ft_`:\n\n```c\nft_putstr(\"Hello, world!\\n\");\n```\n\n## ✅ Tests \u003ca name = \"tests\"\u003e\u003c/a\u003e\n\nThis project is partly tested with the\n[Unity framework](https://github.com/ThrowTheSwitch/Unity).\nTo run all tests, run `make`'s `test` rule:\n\n```bash\nmake tests\n```\n\n## ✅ To Do \u003ca name = \"todo\"\u003e\u003c/a\u003e\n\n- [ ] [Implement missing `stdlib.h` functions](https://cplusplus.com/reference/cstdlib/)\n  - [x] `atof()`\n  - [x] `atoi()`\n  - [x] `atol()`\n  - [x] `atoll()`\n  - [ ] `strtod()`\n  - [ ] `strtof()`\n  - [ ] `strtol()`\n  - [ ] `strtold()`\n  - [ ] `strtoll()`\n  - [ ] `strtoul()`\n  - [ ] `strtoull()`\n  - [ ] `rand()`\n  - [ ] `srand()`\n  - [x] `calloc()`\n  - [ ] `free()`\n  - [ ] `malloc()`\n  - [ ] `realloc()`\n  - [ ] `abort()`\n  - [ ] `atexit()`\n  - [ ] `at_quick_exit()`\n  - [ ] `exit()`\n  - [ ] `getenv()`\n  - [ ] `quick_exit()`\n  - [ ] `system()`\n  - [ ] `_Exit()`\n  - [ ] `bsearch()`\n  - [ ] `qsort()`\n  - [x] `abs()`\n  - [ ] `div()`\n  - [ ] `labs()`\n  - [ ] `ldiv()`\n  - [ ] `llabs()`\n  - [ ] `lldiv()`\n  - [ ] `mblen()`\n  - [ ] `mbtowc()`\n  - [ ] `wctomb()`\n  - [ ] `mbstowcs()`\n  - [ ] `wcstombs()`\n\n## 🐙 Github Actions \u003ca name = \"github_actions\"\u003e\u003c/a\u003e\n\n[Norminette Github Action](https://github.com/AdrianWR/libft/blob/master/.github/workflows/norminette.yaml)\nby [@AdrianWR](https://github.com/AdrianWR)\n\n## 🛸 42 São Paulo \u003ca name = \"ft_sp\"\u003e\u003c/a\u003e\n\nPart of the larger [42 Network](https://www.42.fr/42-network/),\n[42 São Paulo](https://www.42sp.org.br/) is a software engineering school\nthat offers a healthy alternative to traditional education:\n\n- It doesn't have any teachers and classes.\n- Students learn by cooperating\n  and correcting each other's work (peer-to-peer learning).\n- Its focus is as much on social skills as it is on technical skills.\n- It's completely free to anyone that passes its selection process -\n  [**The Piscine**](https://42.fr/en/admissions/42-piscine/)\n\nIt's an amazing school, and I'm grateful for the opportunity.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_libft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibrity%2Fft_libft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibrity%2Fft_libft/lists"}