{"id":20442837,"url":"https://github.com/simon-zerisenay/42-ft_printf","last_synced_at":"2025-03-05T08:17:28.154Z","repository":{"id":97688328,"uuid":"586515703","full_name":"simon-zerisenay/42-ft_printf","owner":"simon-zerisenay","description":"42 ft_printf: ft_printf is a project that involves recreating the functionality of the printf function from the standard C library. The project focuses on parsing format specifiers, formatting output, and handling various data types.","archived":false,"fork":false,"pushed_at":"2023-06-21T10:55:50.000Z","size":136,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T20:46:03.676Z","etag":null,"topics":["42abudhabi","42school","c","ecole42","libft42","printf","printf-42"],"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/simon-zerisenay.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-01-08T12:28:49.000Z","updated_at":"2025-01-14T23:32:24.000Z","dependencies_parsed_at":"2024-01-07T01:28:03.250Z","dependency_job_id":null,"html_url":"https://github.com/simon-zerisenay/42-ft_printf","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/simon-zerisenay%2F42-ft_printf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42-ft_printf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42-ft_printf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42-ft_printf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon-zerisenay","download_url":"https://codeload.github.com/simon-zerisenay/42-ft_printf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241989860,"owners_count":20053804,"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":["42abudhabi","42school","c","ecole42","libft42","printf","printf-42"],"created_at":"2024-11-15T09:43:13.523Z","updated_at":"2025-03-05T08:17:28.121Z","avatar_url":"https://github.com/simon-zerisenay.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003e ft_printf - 42 Abu Dhabi \u003c/h1\u003e\n\n\u003ca href=\"https://github.com/simon-zerisenay/42-ft_printf\"\u003e![42 Badge](https://github.com/mcombeau/mcombeau/blob/main/42_badges/ft_printfm.png)\u003c/a\u003e\n\n\u003c/div\u003e \n\u003clabel\u003e   \n\t\u003ch2\u003e Score \u003c/h2\u003e\t \n\t\u003cimg alt=\"100\" style=\"width: 100px;height: 70px\" src=\"https://github.com/simon-zerisenay/simon-zerisenay/blob/main/100.png\"/\u003e\n\u003c/label\u003e \n  \n\u003ch2\u003e Introduction \u003c/h2\u003e \n\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"GitHub code size in bytes\" src=\"https://img.shields.io/github/languages/code-size/simon-zerisenay/42-ft_printf?color=lightblue\" /\u003e\n\t\u003cimg alt=\"Number of lines of code\" src=\"https://img.shields.io/tokei/lines/github/simon-zerisenay/42-ft_printf?color=critical\" /\u003e\n\t\u003cimg alt=\"Code language count\" src=\"https://img.shields.io/github/languages/count/simon-zerisenay/42-ft_printf?color=yellow\" /\u003e\n\t\u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/simon-zerisenay/42-ft_printf?color=blue\" /\u003e\n\t\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/simon-zerisenay/42-ft_printf?color=green\" /\u003e\n\u003c/p\u003e \nWelcome to the ft_printf project! This project is part of the curriculum at 42 Abu Dhabi and aims to develop your understanding of variadic functions and string formatting in the C programming language. ft_printf is a custom implementation of the printf function, which allows for formatted output to the standard output stream.\n \n\u003ch2\u003e Objective \u003c/h2\u003e\nThe main objective of this project is to recreate the printf function, providing similar functionality and behavior. By building your own version of printf, you will deepen your understanding of the inner workings of the function and gain hands-on experience in string manipulation, handling format specifiers, and managing variadic arguments.\n\n\u003ch2\u003e Features \u003c/h2\u003e\n\u003ch4\u003e Format Specifiers \u003c/h4\u003e\nThe ft_printf function supports a wide range of format specifiers, allowing you to format and print various types of data. Some of the commonly used format specifiers include:\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n%c: Character \u003cbr/\u003e\n%s: String \u003cbr/\u003e\n%d or %i: Signed decimal integer \u003cbr/\u003e\n%u: Unsigned decimal integer \u003cbr/\u003e\n%x or %X: Unsigned hexadecimal integer \u003cbr/\u003e\n%f: Floating-point number \u003cbr/\u003e\n%p: Pointer address \u003cbr/\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\nThese format specifiers enable you to print data in a specific format, making it easier to display and interpret different types of information.\n\nWidth and Precision\nYou can specify the width and precision of the output using optional flags in the format specifier. The width determines the minimum number of characters to be printed, while the precision specifies the maximum number of characters to be printed for strings or the number of decimal places for floating-point numbers.\n\nFlags and Modifiers\nThe ft_printf function supports various flags and modifiers to customize the output. Some of the commonly used flags include:\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n-: Left-justify the output\n+: Prepend a plus sign to positive numbers\n0: Pad the output with zeros\n#: Add the \"0x\" or \"0X\" prefix for hexadecimal values\n\u003c/div\u003e\n\u003cbr/\u003e\n\tThese flags and modifiers allow you to modify the appearance of the output to meet your specific requirements.\n\n\u003ch2\u003e Variadic Argument Handling \u003c/h2\u003e\n\u003cbr/\u003e\nOne of the key aspects of ft_printf is its ability to handle variadic arguments. By utilizing the stdarg.h header and the va_list type, you can process a variable number of arguments passed to the function. This flexibility enables you to handle different types of data and dynamically generate the output based on the provided format specifiers.\n\n\u003ch2\u003e Installation and Usage \u003c/h2\u003e\n\u003cbr/\u003e\nTo use ft_printf in your project, follow these steps:\n\nClone the repository: \n\n                           git clone https://github.com/your_username/42-ft_printf.git\nNavigate to the project directory: \n\n\t\t\t\t\t\tcd 42-ft_printf\n\nCompile the ft_printf library: \n\n\t\t\t\t\t\t make\nUse the ft_printf executable to execute the programme standard output stream: \n\n\t\t\t\t\t\t./ft_printf\nRefer to the project's documentation and code files for more detailed information and examples of how to use the ft_printf function effectively.\n\n\u003ch2\u003e How it Works \u003c/h2\u003e\n\u003cbr/\u003e\nThe ft_printf function follows a systematic process to handle the provided format string and corresponding arguments:\n\nParse the format string and identify format specifiers, flags, width, precision, and modifiers.\nRetrieve the arguments based on the format specifiers and perform necessary data conversions.\nGenerate the formatted output according to the specified format and desired appearance.\nPrint the final output to the standard output stream.\n\u003cbr/\u003e\nBy following this process, ft_printf ensures accurate formatting and printing of the provided data, mimicking the behavior\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-zerisenay%2F42-ft_printf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-zerisenay%2F42-ft_printf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-zerisenay%2F42-ft_printf/lists"}