{"id":25097545,"url":"https://github.com/iaceene/ft_printf","last_synced_at":"2025-08-29T06:26:04.695Z","repository":{"id":263302982,"uuid":"887472296","full_name":"iaceene/ft_printf","owner":"iaceene","description":"ft_printf is a custom implementation of the standard C library function printf. This project is part of the 42 curriculum and aims to develop a better understanding of how formatted output works in C.","archived":false,"fork":false,"pushed_at":"2025-01-05T19:46:27.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T02:46:43.092Z","etag":null,"topics":["1337cursus","42school","printf-42","printf-project"],"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/iaceene.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":"2024-11-12T20:00:40.000Z","updated_at":"2025-01-05T19:46:31.000Z","dependencies_parsed_at":"2024-11-17T18:24:28.506Z","dependency_job_id":"1e3ed55e-e747-49f9-8c1e-a63887df187a","html_url":"https://github.com/iaceene/ft_printf","commit_stats":null,"previous_names":["iaceene/ft_printf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iaceene/ft_printf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2Fft_printf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2Fft_printf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2Fft_printf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2Fft_printf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iaceene","download_url":"https://codeload.github.com/iaceene/ft_printf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaceene%2Fft_printf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272641498,"owners_count":24968802,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["1337cursus","42school","printf-42","printf-project"],"created_at":"2025-02-07T17:32:22.043Z","updated_at":"2025-08-29T06:26:04.504Z","avatar_url":"https://github.com/iaceene.png","language":"C","readme":"# ft_printf\r\n\r\n## Description\r\n\r\n`ft_printf` is a custom implementation of the standard C library function `printf`. This project is part of the 42 curriculum and aims to develop a better understanding of how formatted output works in C. The project requires implementing a function that produces output according to a specified format string, with support for various format specifiers.\r\n\r\n## Features\r\n- Support for basic format specifiers (`%c`, `%s`, `%d`, `%i`, `%u`, `%x`, `%X`, etc.)\r\n- Implementation of optional flags, width, and precision for formatting.\r\n- Handle of the following conversion types:\r\n  - `%c`: Character\r\n  - `%s`: String\r\n  - `%d` / `%i`: Signed integer\r\n  - `%u`: Unsigned integer\r\n  - `%x` / `%X`: Unsigned hexadecimal (lowercase / uppercase)\r\n  - `%p`: Pointer address\r\n  - `%%`: Literal percent sign\r\n\r\n## Objective\r\nThe goal of this project is to:\r\n- Implement a minimalistic `printf` function from scratch.\r\n- Work with variadic functions to handle a variable number of arguments.\r\n- Explore how format specifiers and formatting options are handled in the C language.\r\n\r\n## Getting Started\r\n\r\n### Prerequisites\r\n- Basic knowledge of C programming and memory management.\r\n- A working installation of a C compiler (e.g., GCC or Clang).\r\n\r\n### Installation\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/iaceene/ft_printf.git\r\n   cd ft_printf\r\n2. Compile the program using Makefile (if provided):\r\n```bash\r\n  make\r\n```\r\n### Usage\r\n- Once the project is compiled, you can use the ft_printf function in your C programs by including the header file:\r\n```c\r\n#include \"ft_printf.h\"\r\nYou can then call the function in a similar way to printf, but using your own custom implementation:\r\n```\r\n```c\r\nft_printf(\"Hello, %s!\\n\", \"world\");\r\nft_printf(\"Hex: %x\\n\", 255);\r\nft_printf(\"Pointer: %p\\n\", \u0026some_variable);\r\n```\r\nExample\r\n```c\r\n#include \"ft_printf.h\"\r\n\r\nint main(void) {\r\n    ft_printf(\"Character: %c\\n\", 'A');\r\n    ft_printf(\"String: %s\\n\", \"Hello, World!\");\r\n    ft_printf(\"Decimal: %d\\n\", 123);\r\n    ft_printf(\"Hexadecimal: %x\\n\", 255);\r\n    return 0;\r\n}\r\n```\r\n\r\nOutput:\r\n```bash\r\nCharacter: A\r\nString: Hello, World!\r\nDecimal: 123\r\nHexadecimal: ff\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaceene%2Fft_printf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiaceene%2Fft_printf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaceene%2Fft_printf/lists"}