{"id":21285335,"url":"https://github.com/izenynn/libft","last_synced_at":"2025-07-11T11:32:19.466Z","repository":{"id":47766983,"uuid":"406504950","full_name":"izenynn/libft","owner":"izenynn","description":"42 Cursus - Libft:  My implementation of some useful C functions and some additional ones to use it in future projects of 42.","archived":false,"fork":false,"pushed_at":"2023-07-24T18:35:11.000Z","size":162,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:11:30.383Z","etag":null,"topics":["42","42born2code","c","get-next-line","getnextline","getnextline42","lib","libc","libft","libft42","library","linux","macos","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/izenynn.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":"2021-09-14T20:00:07.000Z","updated_at":"2024-08-18T03:25:09.000Z","dependencies_parsed_at":"2024-11-21T11:29:49.868Z","dependency_job_id":null,"html_url":"https://github.com/izenynn/libft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/izenynn/libft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izenynn%2Flibft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izenynn%2Flibft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izenynn%2Flibft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izenynn%2Flibft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izenynn","download_url":"https://codeload.github.com/izenynn/libft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izenynn%2Flibft/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264795387,"owners_count":23665227,"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","42born2code","c","get-next-line","getnextline","getnextline42","lib","libc","libft","libft42","library","linux","macos","printf","printf-42"],"created_at":"2024-11-21T11:19:45.713Z","updated_at":"2025-07-11T11:32:19.436Z","avatar_url":"https://github.com/izenynn.png","language":"C","readme":"# 42 Cursus - libft\n\n## Info\n\nMy implementation of some useful C functions and some additional ones to use it in future projects of 42.\n\n- Status: still updating (I use libft a lot so I keep improving it)\n- Result: 125%\n- Observations: (null)\n\n## How to install and use\n\n- Clone libft into your project folder\n\n```sh\ngit clone https://github.com/izenynn/libft.git\n```\n\n- Run make inside libft folder (make rules: all, clean, fclean, re)\n\n```sh\nmake\n```\n\n- Include libft.h in the header of your C file\n\n```c\n#include \u003clibft.h\u003e\n```\n\n- Or include only the part that you are going to use (list of functions below)\n\n```c\n#include \u003clibft/ft_char.h\u003e\n#include \u003clibft/ft_str.h\u003e\n#include \u003clibft/ft_mem.h\u003e\n#include \u003clibft/ft_nbr.h\u003e\n#include \u003clibft/ft_fd.h\u003e\n#include \u003clibft/ft_lst.h\u003e\n#include \u003clibft/ft_dlst.h\u003e\n#include \u003clibft/ft_printf.h\u003e\n```\n\n## How to compile with libft\n\n### Compile directly your .c files\n\n- Just make sure you add libft (`libft.a`) and you specify `libft.h` path (`-I` flag) when you compile\n\n```sh\ngcc (...)(.c files) -o (output file) ./libft/libft.a -I ./libft/inc\n```\n\n###  Compile objects (`.o`) (for Makefiles)\n\n- If you want to compile firts your .c files into `.o`, you will need to specify the `-c` flag (no linking) when compiling to `.o` files, and indicate the `libft.h` path with the `-I` flag\n\n```sh\ngcc -c (.c file) -o (.o output file) -I ./libft/inc\n```\n\n- Now we will compile all the `.o` into a program, and do the linking part with `-L` and `-l`, just specify the `libft.a` path with the `-L` flag\n\n```sh\ngcc (...)(.o files) -o (output file) -I ./libft/inc -L ./libft -lft\n```\n\n- ✨ Magic ✨\n\n## List of functions\n\n### ft_char\n- [ft_islower](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_islower.c) - `int ft_islower(int c)`\n- [ft_isupper](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isupper.c) - `int ft_isupper(int c)`\n- [ft_isspace](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isspace.c) - `int ft_isspace(int c)`\n- [ft_isblank](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isspace.c) - `int ft_isblank(int c)`\n- [ft_isalpha](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isalpha.c) - `int ft_isalpha(int c)`\n- [ft_isdigit](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isdigit.c) - `int ft_isdigit(int c)`\n- [ft_isalnum](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isalnum.c) - `int ft_isalnum(int c)`\n- [ft_isascii](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isascii.c) - `int ft_isascii(int c)`\n- [ft_isprint](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_isprint.c) - `int ft_isprint(int c)`\n- [ft_iscntrl](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_iscntrl.c) - `int ft_iscntrl(int c)`\n- [ft_tolower](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_tolower.c) - `int ft_tolower(int c)`\n- [ft_toupper](https://github.com/izenynn/libft/blob/main/src/ft_char/ft_toupper.c) - `int ft_toupper(int c)`\n\n### ft_str\n- [ft_strlen](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strlen.c) - `size_t ft_strlen(const char *s`\n- [ft_strcpy](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strcpy.c) - `char *ft_strcpy(char *dst, const char *src)`\n- [ft_strlcpy](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strlcpy.c) - `size_t ft_strlcpy(char *dst, const char *src, size_t dstsize)`\n- [ft_strcat](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strcat.c) - `char *ft_strcat(char *s1, const char *s2)`\n- [ft_strlcat](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strlcat.c) - `size_t ft_strlcat(char *dst, const char *src, size_t dstsize)`\n- [ft_strchr](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strchr.c) - `char *ft_strchr(const char *s, int c)`\n- [ft_strrchr](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strrchr.c) - `char *ft_strrchr(const char *s, int c)`\n- [ft_strcmp](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strcmp.c) - `int ft_strcmp(const char *s1, const char *s2)`\n- [ft_strncmp](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strncmp.c) - `int ft_strncmp(const char *s1, const char *s2, size_t n)`\n- [ft_strnstr](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strnstr.c) - `char *ft_strnstr(const char *haystack, const char *needle, size_t len)`\n- [ft_strdup](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strdup.c) - `char *ft_strdup(const char *s1)`\n- [ft_substr](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_substr.c) - `char *ft_substr(const char *s, unsigned int start, size_t len)`\n- [ft_strjoin](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strjoin.c) - `char *ft_strjoin(const char *s1, const char *s2)`\n- [ft_strtrim](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strtrim.c) - `char *ft_strtrim(const char *s1, const char *set)`\n- [ft_split](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_split.c) - `char **ft_split(const char *s1, const char *set)`\n- [ft_strmap](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strmap.c) - `char *ft_strmap(const char *s, char (*f)(char))`\n- [ft_strmapi](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strmapi.c) - `char *ft_strmapi(const char *s, char (*f)(unsigned int, char))`\n- [ft_striter](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_striter.c) - `void ft_striter(char *s, void (*f)(char *))`\n- [ft_striteri](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_striteri.c) - `void ft_striteri(char *s, void (*f)(unsigned int, char *))`\n- [ft_strrev](https://github.com/izenynn/libft/blob/main/src/ft_str/ft_strrev.c) - `char *ft_strrev(char *s)`\n\n### ft_mem\n- ft_memset\n- ft_bzero\n- ft_memcpy\n- ft_memmove\n- ft_memchr\n- ft_memcmp\n- ft_calloc\n- ft_realloc\n\n### ft_nbr\n- ft_atoi\n- ft_itoa\n- ft_atoi_base\n- ft_itoa_base\n- ft_convert_base\n- ft_intlen\n- ft_intlen_base\n- ft_uintlen\n- ft_uintlen_base\n- ft_ulonglen\n- ft_ulonglen_base\n\n### ft_fd\n- ft_putchar_fd\n- ft_putstr_fd\n- ft_putendl_fd\n- ft_putnbr_fd\n- ft_putmem_fd\n- ft_get_next_line\n\n### ft_lst\n- ft_lstnew\n- ft_lstadd_front\n- ft_lstadd_back\n- ft_lstsize\n- ft_lstlast\n- ft_lstdelone\n- ft_lstclear\n- ft_lstiter\n- ft_lstmap\n\n### ft_dlst\n- ft_dlstnew\n- ft_dlstadd_front\n- ft_dlstadd_back\n- ft_dlstsize\n- ft_dlstfirst\n- ft_dlstlast\n- ft_dlstdelone\n- ft_dlstclear\n- ft_dlstiter\n- ft_dlstmap\n\n### ft_printf\n- ft_printf\n- ft_dprintf\n\n## ft_printf flags\n\n- `%c` print a single character.\n- `%s` print a string of characters.\n- `%p` the void * pointer argument is printed in hexadecimal.\n- `%d` print a decimal (base 10) number.\n- `%i` print an integer in base 10.\n- `%u` print an unsigned decimal (base 10) number\n- `%x` print a number in hexadecimal (base 16) with lowercase.\n- `%X` print a number in hexadecimal (base 16) with uppercase.\n- `%%` print a percent sign.\n- `-` left-justify within the given field width; Right justification is the default.\n- `0` left-pads the number with zeroes (0) instead of spaces when padding is specified.\n- `.` the precision in not specified in the format string, but as an additional integer value argument preceding the argument that has to be formated.\n- `#` used with x or X specifiers the value is preceeded with 0x or 0X respectively for the values different than zero.\n- `(space)` if no sign is going to be written, a blank space is inserted before the value.\n- `+` forces to preceed the result with a plus or minus sign (+ or -) even for positive numbers. By default, only negative numbers are preceded with a - sign.\n\n##\n[![forthebadge](https://forthebadge.com/images/badges/made-with-c.svg)](https://forthebadge.com)\n[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizenynn%2Flibft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizenynn%2Flibft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizenynn%2Flibft/lists"}