{"id":18337774,"url":"https://github.com/pin3dev/42_ft_printf","last_synced_at":"2025-04-09T20:18:42.520Z","repository":{"id":259536683,"uuid":"839925740","full_name":"pin3dev/42_ft_Printf","owner":"pin3dev","description":"Replicates standard printf function in C. This project deepens understanding of variadic functions, data formatting, and low-level I/O management.","archived":false,"fork":false,"pushed_at":"2024-10-24T23:23:26.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T20:18:38.148Z","etag":null,"topics":["42-cursus","42-school","42born2code","custom-library","format-specifiers","libc","printf","printf-42","varargs","variadic-function"],"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/pin3dev.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-08-08T15:49:14.000Z","updated_at":"2024-10-24T23:23:30.000Z","dependencies_parsed_at":"2024-10-26T17:43:38.917Z","dependency_job_id":null,"html_url":"https://github.com/pin3dev/42_ft_Printf","commit_stats":null,"previous_names":["pin3dev/42_ft_printf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft_Printf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft_Printf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft_Printf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pin3dev%2F42_ft_Printf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pin3dev","download_url":"https://codeload.github.com/pin3dev/42_ft_Printf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103908,"owners_count":21048246,"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-cursus","42-school","42born2code","custom-library","format-specifiers","libc","printf","printf-42","varargs","variadic-function"],"created_at":"2024-11-05T20:12:13.721Z","updated_at":"2025-04-09T20:18:42.499Z","avatar_url":"https://github.com/pin3dev.png","language":"C","readme":"\u003ch1 align=\"center\"\u003eft_Printf\u003c/h1\u003e\n\u003cp align=\"center\"\u003e \n  \u003cimg src=\"https://img.shields.io/badge/grade-100%2F125-green?style=for-the-badge\u0026logo=42\u0026labelColor=gray\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#01-ft_Printf\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Variadic-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Format-blue?style=for-the-badge\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Limitations-blue?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3\u003e\n  \u003cp align=\"center\"\u003e \n    \u003ca href=\"#introduction\"\u003eIntroduction\u003c/a\u003e • \n    \u003ca href=\"#structure\"\u003eStructure\u003c/a\u003e • \n    \u003ca href=\"#docs\"\u003eDocs\u003c/a\u003e • \n    \u003ca href=\"#cloning\"\u003eCloning\u003c/a\u003e • \n    \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e • \n    \u003ca href=\"#norms\"\u003eNorms\u003c/a\u003e • \n    \u003ca href=\"#theoretical\"\u003eTheoretical\u003c/a\u003e   \n  \u003c/p\u003e\n\u003c/h3\u003e\n\n\n## 🗣️ Introduction \u003ca id=\"introduction\"\u003e\u003c/a\u003e\n\nThis repository contains the implementation of a custom **printf** function, part of a coding project for the **42 School** program.\n\nThe goal of the **ft_printf** project is to recreate the functionality of the standard C **printf** function. This involves handling strings, type conversions, and output formatting in a versatile manner, allowing for a deeper understanding of the internal workings of this common function.\n\nThis implementation supports various format specifiers and data types, making it useful for future projects that cannot rely on the standard C library.\n\n## 🧬 Project Structure \u003ca id=\"structure\"\u003e\u003c/a\u003e\n\nThe structure of the project focuses on creating a main function, **ft_printf**, which can handle different data types and formatting, such as **strings**, **integers**, **characters**, and **hexadecimals**. The project is composed of several auxiliary functions that manipulate and format these data types as needed.\n\n\u003c!-- The main components include:\n- **Type conversion**: Handling different data types, such as integers and strings.\n- **Format specifiers**: Support for various formatting options like `%d`, `%s`, `%x`, among others.\n- **Formatted output**: Precise control over data display in standard output. --\u003e\n\n## 🗃️ Documentation \u003ca id=\"docs\"\u003e\u003c/a\u003e\n\nFor detailed documentation, including usage examples, please visit the link below:\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_Printf/wiki\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/ft_Printf_Docs-lightgreen?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## 🫥 Cloning the Repository \u003ca id=\"cloning\"\u003e\u003c/a\u003e\n\nTo clone this repository and compile the project, run the following commands:\n\n```bash\ngit clone https://github.com/pin3dev/42_ft_Printf.git\ncd 42_ft_Printf/printf\n```\nThis will download the project from GitHub into your local machine in current directory. Once inside the `printf` directory, you must run make to compile the library.  \n\n## 🕹️ Compilation and Usage \u003ca id=\"usage\"\u003e\u003c/a\u003e\n\n### Makefile\n\nA `Makefile` is provided to automate the compilation process. It includes the following rules:\n\n- `all`: Compiles the library and generates the `libftprintf.a` file.\n- `clean`: Removes object files.\n- `fclean`: Removes object files and the library.\n- `re`: Recompiles the entire project.\n- `test`: Compiles the project and runs the test stored in `test/main.c`\n\nTo compile the library, simply run:\n```bash\nmake\n```\n\nThis will generate the `libftprintf.a` library, which can be linked in other projects to use the **ft_printf** function.\n\n### Basic Usage\n\nTo use the **ft_printf** library in your C code, follow the steps below:\n\n1. Include the header in your code:\n    ```c\n    #include \"42_ft_Printf/printf/inc/ft_printf.h\"\n    ```\n\n2. Compile your code with the library:\n    ```bash\n    cc -Wall -Wextra -Werror -o your_exec your_code.c  -L 42_ft_Printf/printf/ -lftprintf -L 42_Libft/libft/ -lft\n    ```\n\n3. You can now use the `ft_printf` function in your program as follows:\n    ```c\n    ft_printf(\"Hello, %s! The number is %d.\\n\", \"world\", 42);\n    ```\n\n\u003c!-- ## 🔠 Format Specifiers\n\nThe **ft_printf** project supports the following format specifiers:\n- `%c`: Prints a single character.\n- `%s`: Prints a string.\n- `%p`: Prints a pointer in hexadecimal format.\n- `%d`/`%i`: Prints a decimal integer.\n- `%u`: Prints an unsigned decimal number.\n- `%x`/`%X`: Prints a hexadecimal number (lowercase/uppercase letters).\n- `%%`: Prints the percentage symbol. --\u003e\n\n## ⚠️ Norms and Guidelines Disclaimer \u003ca id=\"norms\"\u003e\u003c/a\u003e\n\nThis project strictly follows the [**42 School Norm**](https://github.com/pin3dev/42_Cursus/blob/b9cd0fe844ddb441d0b3efb98abcee92aee49535/assets/General/norme.en.pdf) coding guidelines, which significantly influenced certain decisions in its implementation. These rules may sometimes lead to seemingly inefficient or unusual solutions, but they were necessary to meet the strict requirements of the school.\n\n## 📖 Theoretical Background  \u003ca id=\"theoretical\"\u003e\u003c/a\u003e\n\nAll the theoretical material used to develop this project is organized and can be accessed directly via the link below:\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://github.com/pin3dev/42_Cursus/tree/main/library/#01-ft_Printf\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/ft_Printf_Library-gray?style=for-the-badge\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_ft_printf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpin3dev%2F42_ft_printf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpin3dev%2F42_ft_printf/lists"}