Skip to content

Kjur0/42-libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been created as part of the 42 curriculum by kjurkows

libft

Description

libft is a substitute library for libc & libbsd.

All functions are prefixed by ft_.

It implements most used libc/libbsd functions in a safe way, while also implementing additional functions used in 42 curriculum, those include advanced string operations as well as linked lists.

See Detailed description for list of implemented functions.

Instructions

Compilation

To compile libft just use make

make targets

all : compile and link everything (default)
libft.a : link libft
clean : clean objects (remove *.o files)
fclean : full clean (remove everything compiled)
re : recompile and relink everything

Testing

The library is tested with a custom test suite, which can be found here.

Resources

AI Usage

Google search AI mode & AI summaries

AI mode was used for searching through documentations and references.

AI summaries were used to summarize extensive documentations/references (for ease of reading).

GitHub Copilot (via VS Code)

AI inline suggestions were used for repetitive tasks, such as:

  • Writing doxygen docs in libft.h
  • Creating Makefile

Tools

Main IDE used was VS Code with a few extensions:

norminette was used to check La Norme compliance

make, gcc & ar are used for compilation

Detailed description

libft consists of 3 parts:

  1. libc functions
  2. Additional functions
  3. linked list

Each function is implemented in a separate file and compliant with The Norme

See below for a list of implemented functions and their brief descriptions.
For detailed descriptions look inside libf.h or specific files.

Part 1 - libc functions

Functions from libc that are most commonly needed during 42 curriculum

character checking functions

character converting functions

string manipulation functions

memory manipulating functions

string converting functions

  • ft_atoi - convert string to a number

Part 2 - Additional functions

string creation function

output writing functions

Part - linked list

type definition

Linked list node is implemented as such:

/// linked list node
typedef struct s_list
{
	void			*content; ///< data contained in the node
	struct s_list	*next; ///< pointer to the next node or `0` (last node)
}	t_list;

functions

Footnotes

  1. Functions are from libbsd not libc 2 3

About

My very own library

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Contributors