Skip to content

LudwigAndreas/libft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libft

This project is a C library of useful functions that we will use in the future projects.

Table of Contents

About

Libft is a library of useful functions that we will use in the future projects. The library is written in C and is based on the standard C library. The project is a part of the School 21 curriculum.

Functions

Functions from <ctype.h>

Functions from <string.h>

Functions from <stdlib.h>

  • ft_atoi - convert a string to an integer.
  • ft_calloc - allocates memory and sets its bytes' values to 0.

Non-standard functions

  • ft_substr - returns a substring from a string.
  • ft_strjoin - concatenates two strings.
  • ft_strtrim - trims the beginning and end of string with specific set of chars.
  • ft_split - splits a string using a char as parameter.
  • ft_itoa - converts a number into a string.
  • ft_strmapi - applies a function to each character of a string.
  • ft_striteri - applies a function to each character of a string.
  • ft_putchar_fd - output a char to a file descriptor.
  • ft_putstr_fd - output a string to a file descriptor.
  • ft_putendl_fd - output a string to a file descriptor, followed by a new line.
  • ft_putnbr_fd - output a number to a file descriptor.

Linked list functions

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things you need to install the software and how to install them.

gcc >= 7.5.0
make >= 4.1
sudo apt-get install make
sudo apt-get install gcc

Installing

A step by step series of examples that tell you how to get a development env running.

Clone the repository.

git clone https://github.com/LudwigAndreas/libft

cd libft

Build the project.

make

It will compile the library and create a static library file libft.a.

Usage

To use the library in your project, include the header file libft.h in your source files and compile the library with your source files.

#include "libft.h"

int main(void)
{
    char *str = "Hello, World!";
    ft_putstr_fd(str, 1);
    return (0);
}

Built Using

  • C - Programming language
  • Make - Build automation tool

Authors

This project was developed by:

drawing LudwigAndreas

Acknowledgements

License

This project is licensed under the School 21 License - see the LICENSE file for details.

About

Library for 21

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published