libft
A personal C library reimplementing part of the standard library, linked by every later 42 project.
My first project at 42: rebuilding a chunk of the C standard library, plus a set of utility functions reused by everything that came after.
What it contains
- Standard library functions rewritten from their man pages and prefixed
ft_:strlen,memcpy,memmove,strlcpy,strnstr,atoi, and theis*character tests. - Functions the standard library does not provide, or provides differently:
substr,strjoin,strtrim,split,itoa,strmapi,striteri, and theputchar_fdfamily. - A bonus set for singly linked lists:
lstnew,lstadd_front,lstadd_back,lstsize,lstlast,lstdelone,lstclear,lstiter,lstmap.
What it taught me
Reading a man page as a specification and matching it exactly, return values and edge cases included. Everything compiles into libft.a and gets linked by the later projects, so a bug written here surfaces months later, in code that has nothing to do with it.