RealConrad / 42c-library

My C library that consists of Libft, Printf, GNL and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

đź“— C Library

My C library that consists of Libft, Printf and GNL and more.

Coded in  


Features

  • Includes all functions from Libft
  • Includes my own version of printf
  • Includes get_next_line project.
  • All functions are defined by doxygen comments to explain their purpose and enhance readability.
  • Makefile to compile the library

Installation

  1. Clone the repository
git clone https://github.com/RealConrad/42c-library.git
  1. Enter directory
cd 42c-library
  1. Create the library
make
  1. Clean up object files (Opitonal):
make clean

Usage

Make sure you create the library before compiling, else you will get errors!

  1. Add the header file
include "c-library.h" // # include <path-to-header-file>
  1. Compile with the following flags
cc -Wall -Wextra -Werror <your-file> libft.a

Examples

File: main.c

# include "c-library.h"

int main() {
    char *s = "Hello World!";
    int  length = ft_strlen(s);

    ft_printf("Length: %d\n", length);
    return (0);
}

Compiling:

cc -Wall -Wextra -Werror main.c libft.a

License

MIT

About

My C library that consists of Libft, Printf, GNL and more.

License:MIT License


Languages

Language:C 95.5%Language:Makefile 4.5%