Skip to content

yannallo/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Libft

Status Language Norminette

A library of standard C functions

This project is the first step of the 42 curriculum. It aims to implement your own standard C library and improve your knowledge of basic C (data types, memory). This library will be reused during the 42 cursus.

Functions

Category Examples
Memory memset, memcpy, bzero, calloc
Strings strlen, strdup, strjoin, substr
Char isalpha, isdigit, toupper
Convert atoi, itoa
Linked list lstnew, lstadd_back, lstsize

Installation

# Clone repo
git clone https://github.com/yannallo/libft.git

# Build library
make -C libft

Usage

At this point you should have a libft.a (Archive containing all the object file). You will need to include "libft.h" and link the library when compiling.

gcc -Ilibft main.c -Llibft -lft -o test

main.c

#include "libft.h"
#include <stdio.h>

int main(void)
{
  char  *s = ft_strdup("A simple string !!");

  printf("%s\n", s);
  free(s);
  return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published