{"id":31543737,"url":"https://github.com/oviqa/1337-libft","last_synced_at":"2025-10-04T12:42:25.984Z","repository":{"id":316126200,"uuid":"889824401","full_name":"oViqa/1337-Libft","owner":"oViqa","description":"A custom C library implementation recreating essential functions from the standard C library (libc). This foundational project involves coding functions like strlen, strcpy, memset, and more from scratch, providing deep understanding of memory management, string manipulation, and low-level programming concepts.","archived":false,"fork":false,"pushed_at":"2025-09-22T19:37:14.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T21:23:43.937Z","etag":null,"topics":["c","c-programming-language","calloc"],"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/oViqa.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-17T10:39:12.000Z","updated_at":"2025-09-22T19:37:18.000Z","dependencies_parsed_at":"2025-09-22T21:23:46.861Z","dependency_job_id":null,"html_url":"https://github.com/oViqa/1337-Libft","commit_stats":null,"previous_names":["oviqa/1337-libft"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/oViqa/1337-Libft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oViqa%2F1337-Libft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oViqa%2F1337-Libft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oViqa%2F1337-Libft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oViqa%2F1337-Libft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oViqa","download_url":"https://codeload.github.com/oViqa/1337-Libft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oViqa%2F1337-Libft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278315190,"owners_count":25966774,"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-10-04T02:00:05.491Z","response_time":63,"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":["c","c-programming-language","calloc"],"created_at":"2025-10-04T12:42:21.038Z","updated_at":"2025-10-04T12:42:25.978Z","avatar_url":"https://github.com/oViqa.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 Libft - My First C Library\n\n\u003e *\"The beginning of wisdom is the definition of terms.\"* - Socrates\n\n**Libft** is my implementation of essential C standard library functions, created as the foundational project at **1337 School**. This project taught me the fundamentals of C programming by rebuilding core functions from scratch.\n\n## 🎯 Project Overview\n\nThe goal was to create my own C library containing a collection of functions that are essential for C programming. This library serves as the foundation for all future projects at 1337 School.\n\n### What I Built\n- **42 functions** recreating essential libc functions\n- **Memory management** functions \n- **String manipulation** utilities\n- **Character validation** functions\n- **Linked list** manipulation functions (bonus part)\n\n## 🛠️ Functions Implemented\n\n### Part 1 - Libc Functions\nFunctions that exist in the C standard library:\n\n| Function | Description |\n|----------|-------------|\n| `ft_strlen` | Calculate string length |\n| `ft_strcpy` | Copy strings |\n| `ft_strcmp` | Compare strings |\n| `ft_memset` | Fill memory with bytes |\n| `ft_memcpy` | Copy memory area |\n| `ft_isalpha` | Check if alphabetic |\n| `ft_isdigit` | Check if digit |\n| `ft_toupper` | Convert to uppercase |\n| `ft_tolower` | Convert to lowercase |\n| And many more... |\n\n### Part 2 - Additional Functions\nFunctions not in libc or with different prototypes:\n\n| Function | Description |\n|----------|-------------|\n| `ft_substr` | Extract substring |\n| `ft_strjoin` | Concatenate strings |\n| `ft_strtrim` | Trim characters from string |\n| `ft_split` | Split string by delimiter |\n| `ft_itoa` | Convert integer to string |\n| `ft_putchar_fd` | Output char to file descriptor |\n| `ft_putstr_fd` | Output string to file descriptor |\n\n### Bonus Part - Linked Lists\n| Function | Description |\n|----------|-------------|\n| `ft_lstnew` | Create new list element |\n| `ft_lstadd_front` | Add element at beginning |\n| `ft_lstsize` | Count list elements |\n| `ft_lstlast` | Get last element |\n| `ft_lstadd_back` | Add element at end |\n| `ft_lstclear` | Delete and free list |\n\n## 🚀 How to Use\n\n### Compilation\n```bash\n# Compile the library\nmake\n\n# Compile with bonus functions\nmake bonus\n\n# Clean object files\nmake clean\n\n# Clean everything\nmake fclean\n\n# Recompile everything\nmake re\n```\n\n### Usage Example\n```c\n#include \"libft.h\"\n#include \u003cstdio.h\u003e\n\nint main(void)\n{\n    char *str = \"Hello, 1337!\";\n    char *substr;\n    \n    printf(\"Original: %s\\n\", str);\n    printf(\"Length: %zu\\n\", ft_strlen(str));\n    \n    substr = ft_substr(str, 7, 4);\n    printf(\"Substring: %s\\n\", substr);\n    \n    free(substr);\n    return (0);\n}\n```\n\n### Compilation with Your Project\n```bash\ngcc -Wall -Wextra -Werror your_program.c -L. -lft -o your_program\n```\n\n## 📋 Requirements \u0026 Norms\n\n- **Language**: C\n- **Norm**: 1337/42 School coding standard\n- **Functions**: No global variables\n- **Memory**: All heap-allocated memory must be freed\n- **Error handling**: Functions should not crash unexpectedly\n\n### Compilation Flags\n```bash\n-Wall -Wextra -Werror\n```\n\n## 🎓 What I Learned\n\nThis project was crucial for understanding:\n\n- **Memory Management**: Manual allocation and deallocation\n- **Pointer Manipulation**: Working with different levels of indirection  \n- **String Operations**: Understanding how strings work at a low level\n- **Linked Lists**: Dynamic data structures and memory allocation\n- **Makefile**: Automating compilation process\n- **Code Organization**: Structuring a library project\n- **Testing**: Writing comprehensive tests for each function\n\n## 🧪 Testing\n\nI created comprehensive tests to verify each function works correctly:\n\n```bash\n# Example test structure\nmake test\n./test_libft\n```\n\n## 📁 Project Structure\n\n```\nlibft/\n├── src/           # Source files (.c)\n├── include/       # Header files (.h)  \n├── Makefile       # Compilation rules\n└── README.md      # This file\n```\n\n## 💭 Reflections\n\nBuilding Libft from scratch gave me a deep appreciation for the standard library functions we often take for granted. Every `strlen()` call, every `malloc()`, every string operation - I now understand what happens under the hood.\n\nThis project laid the foundation for all my subsequent C projects at 1337 School and taught me the importance of:\n- Writing clean, readable code\n- Proper memory management  \n- Comprehensive testing\n- Following coding standards\n\n---\n\n*This project was completed as part of the 1337 School curriculum (42 Network).*\n\n**Author**: Hiba  \n**School**: 1337 (42 Network)  \n**Year**: 2024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foviqa%2F1337-libft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foviqa%2F1337-libft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foviqa%2F1337-libft/lists"}