{"id":21898188,"url":"https://github.com/minightdev/printf","last_synced_at":"2025-06-27T08:37:03.707Z","repository":{"id":182889229,"uuid":"669269438","full_name":"MinightDev/printf","owner":"MinightDev","description":"This project is a custom implementation of the _printf function, which mimics the behavior of the standard C library function printf. The collaborators on this project are MinightDev and SoufianeAziz.","archived":false,"fork":false,"pushed_at":"2023-07-25T23:42:29.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T06:12:12.332Z","etag":null,"topics":["c-lang","printf","printf-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/MinightDev.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-07-21T19:14:00.000Z","updated_at":"2024-02-17T23:44:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"c057fadd-88e4-41cf-af8d-3dcddcf7e8db","html_url":"https://github.com/MinightDev/printf","commit_stats":null,"previous_names":["minightdev/printf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinightDev%2Fprintf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinightDev%2Fprintf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinightDev%2Fprintf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinightDev%2Fprintf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinightDev","download_url":"https://codeload.github.com/MinightDev/printf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244908948,"owners_count":20530135,"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-lang","printf","printf-function"],"created_at":"2024-11-28T14:24:33.030Z","updated_at":"2025-03-22T05:20:38.056Z","avatar_url":"https://github.com/MinightDev.png","language":"C","readme":"# Custom _printf Function\n\nThis project is a custom implementation of the `_printf` function, which mimics the behavior of the standard C library function `printf`. The collaborators on this project are MinightDev and SoufianeAziz.\n\n## Files:\n\n1. **functions.c**: Contains functions to handle printing of various data types, such as strings, integers, hexadecimals, octals, addresses, and binary.\n2. **main.h**: Header file containing function prototypes and necessary includes.\n3. **_printf.c**: The main implementation of the custom `_printf` function.\n4. **handlers.c**: Contains helper functions to handle different conversion specifiers for custom functionality like ROT13 encryption, binary printing, reversed string printing, etc.\n5. **testing/main.c**: A test program to demonstrate the functionality of the custom `_printf` function.\n\n## Functionality:\n\nThe custom `_printf` function supports the following conversion specifiers:\n\n- `%c`: For printing characters.\n- `%s`: For printing strings.\n- `%d` and `%i`: For printing signed integers.\n- `%u`: For printing unsigned integers.\n- `%x` and `%X`: For printing hexadecimal numbers (lowercase and uppercase, respectively).\n- `%o`: For printing octal numbers.\n- `%p`: For printing addresses.\n- `%b`: For printing binary representation of unsigned integers.\n- `%S`: For printing strings with special handling for non-printable characters (replaced with hexadecimal escape sequences).\n- `%r`: For printing strings in reverse.\n- `%R`: For printing strings with ROT13 encryption.\n\n## How to Use:\n\n1. Include the `\"main.h\"` header in your source file.\n2. Call the `_printf` function with the desired format string and any additional arguments corresponding to the format specifiers.\n\n## Example Usage:\n\n```c\n#include \"main.h\"\n\nint main(void)\n{\n    _printf(\"Hello, %s! This is a test program.\\n\", \"Developer\");\n    _printf(\"Decimal: %d, Hexadecimal: %x\\n\", 123, 123);\n    _printf(\"Address: %p\\n\", (void *)0x7ffe637541f0);\n    _printf(\"Binary: %b\\n\", 10);\n    _printf(\"Non-printable: %S\\n\", \"Best\\nSchool\");\n    _printf(\"Reversed: %r\\n\", \"Hello\");\n    _printf(\"ROT13: %R\\n\", \"Hello world\");\n\n    return (0);\n}\n```\n\n## Contributors:\n\n- MinightDev\n- SoufianeAziz\n\nFor any issues or improvements, feel free to contact the collaborators. Happy coding!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminightdev%2Fprintf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminightdev%2Fprintf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminightdev%2Fprintf/lists"}