{"id":22343857,"url":"https://github.com/miou-zora/lib-c-ursed","last_synced_at":"2026-02-02T15:39:45.537Z","repository":{"id":191685621,"uuid":"477619996","full_name":"Miou-zora/lib-C-ursed","owner":"Miou-zora","description":"A libmy (Epitech Small LibC) that try to reach limit of ternary and recursive functions in C.","archived":false,"fork":false,"pushed_at":"2025-09-09T22:20:10.000Z","size":354,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-10T02:03:51.520Z","etag":null,"topics":["c","c-ursed","cursed","epitech"],"latest_commit_sha":null,"homepage":"","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/Miou-zora.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T08:52:31.000Z","updated_at":"2025-01-15T04:29:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ad06215-c448-4991-a98d-421355fb9d23","html_url":"https://github.com/Miou-zora/lib-C-ursed","commit_stats":null,"previous_names":["miou-zora/lib-c-ursed"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Miou-zora/lib-C-ursed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miou-zora%2Flib-C-ursed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miou-zora%2Flib-C-ursed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miou-zora%2Flib-C-ursed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miou-zora%2Flib-C-ursed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Miou-zora","download_url":"https://codeload.github.com/Miou-zora/lib-C-ursed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miou-zora%2Flib-C-ursed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29014504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T14:58:54.169Z","status":"ssl_error","status_checked_at":"2026-02-02T14:58:51.285Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","c-ursed","cursed","epitech"],"created_at":"2024-12-04T09:06:37.966Z","updated_at":"2026-02-02T15:39:45.524Z","avatar_url":"https://github.com/Miou-zora.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib C ursed\r\n\r\nThe goal of this project is to try to reach limit of ternary and recursive functions of the libmy (Epitech Small C Pool LibC).\r\n\r\nIf possible, this Lib C allows anyone who doesn't like Coding Style to do as they see fit.\r\nIt is still not recommended to use it for people who are not experienced in C, in ternary and recursive functions.\r\n\r\n## Example\r\n\r\n```c\r\nvoid *my_memset(void *ptr, unsigned long long data, unsigned long long size)\r\n{\r\n    return\r\n    (size--) ?\r\n        my_memset(ptr, (((char *)ptr)[size] = data), size)\r\n    :\r\n        ptr;\r\n}\r\n```\r\nAs you can see, the function is written in a single line, with a ternary operator and a recursive call. I have also created some coding style rules to make the code more readable which are:\r\n- Start the function with a return\r\n- Use ternary as if-like statement\r\n\r\nYou can find some honorable mentions [here](#honorable-mentions).\r\n\r\n## Functions\r\n\r\nCreated (39 / 46)       | Tested (39 / 46)         | Name\r\n---------------|----------------|-------\r\n🟩 | 🟩 | data_to_array_str (partially)\r\n🟩 | 🟩 | data_to_array_str (partially)\r\n🟩 | 🟩 | get_nbrlen\r\n🟩 | 🟩 | my_abs\r\n🟩 | 🟩 | my_calloc\r\n🟩 | 🟩 | my_compute_power_rec\r\n🟩 | 🟩 | my_compute_square_root\r\n🟥 | 🟥 | my_convert_base (partially)\r\n🟩 | 🟩 | my_find_prime_sup\r\n🟥 | 🟥 | my_fputthat\r\n🟩 | 🟩 | my_getnbr (une pepite)\r\n🟩 | 🟩 | my_is_prime\r\n🟩 | 🟩 | my_isneg\r\n🟩 | 🟩 | my_max\r\n🟩 | 🟩 | my_memset\r\n🟩 | 🟩 | my_min\r\n🟥 | 🟥 | my_printf\r\n🟩 | 🟩 | my_put_nbr\r\n🟩 | 🟩 | my_putchar\r\n🟩 | 🟩 | my_putstr\r\n🟩 | 🟩 | my_revstr\r\n🟥 | 🟥 | my_showmem (to create)\r\n🟥 | 🟥 | my_showstr (to create)\r\n🟥 | 🟥 | my_sort_int_array\r\n🟩 | 🟩 | my_str_isalpha\r\n🟩 | 🟩 | my_str_isan\r\n🟩 | 🟩 | my_str_islower\r\n🟩 | 🟩 | my_str_isnum\r\n🟩 | 🟩 | my_str_isprintable\r\n🟩 | 🟩 | my_str_isupper\r\n🟩 | 🟩 | my_str_without_char_array\r\n🟩 | 🟩 | my_str_without_space\r\n🟩 | 🟩 | my_strcapitalize\r\n🟩 | 🟩 | my_strcat\r\n🟩 | 🟩 | my_strcmp\r\n🟩 | 🟩 | my_strcpy\r\n🟩 | 🟩 | my_strdup\r\n🟩 | 🟩 | my_strlen\r\n🟩 | 🟩 | my_strlowcase\r\n🟩 | 🟩 | my_strncat\r\n🟩 | 🟩 | my_strncmp\r\n🟩 | 🟩 | my_strncpy\r\n🟩 | 🟩 | my_strstr (special case: no ternary, ptr on func, if, else, while, for recursive implementation)\r\n🟩 | 🟩 | my_strupcase\r\n🟩 | 🟩 | my_swap\r\n🟥 | 🟥 | myf_putbase\r\n\r\n## Honorable mentions\r\n\r\n- [my_calloc](https://github.com/Miou-zora/lib-C-ursed/blob/6a611900b5271a5a32833514a0fb8db560f28ea3/lib/my/fonctions/my_calloc.c): cast a function that use void as return value to use it in a ternary operator.\r\n- [my_swap](https://github.com/Miou-zora/lib-C-ursed/blob/6a611900b5271a5a32833514a0fb8db560f28ea3/lib/my/fonctions/my_swap.c): use XOR operator to swap two values.\r\n- [data_to_array_str](https://github.com/Miou-zora/lib-C-ursed/blob/6a611900b5271a5a32833514a0fb8db560f28ea3/lib/my/fonctions/data_to_array_str.c) and [my_convert_base](https://github.com/Miou-zora/lib-C-ursed/blob/6a611900b5271a5a32833514a0fb8db560f28ea3/lib/my/fonctions/my_convert_base.c): biggests functions I've done.\r\n- [my_strstr](https://github.com/Miou-zora/lib-C-ursed/blob/6a611900b5271a5a32833514a0fb8db560f28ea3/lib/my/fonctions/my_strstr.c): no \"ptr on func, ternary, if, else, while, for\" recursive implementation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiou-zora%2Flib-c-ursed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiou-zora%2Flib-c-ursed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiou-zora%2Flib-c-ursed/lists"}