Skip to content

🖨️ ft_printf was one of the first projects to be carried out at 42. The aim is to re-code the printf function in order to understand how it works. In future projects, the use of printf is forbidden, but we can use our own ft_printf function.

Notifications You must be signed in to change notification settings

julienhouyet/42-ft_printf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-ft_printf

42-ft_printf

Introduction

ft_printf was one of the first projects to be carried out at 42. The aim is to re-code the printf function in order to understand how it works. In future projects, the use of printf is forbidden, but we can use our own ft_printf function.

At 42 School, almost every project must be written in accordance to the Norm, the school's coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.

⚡ Usage

To use this library, import the "include/ft_printf.h" header into your files after compiling the library.

#include "include/ft_printf.h"

🔌 Installation

To install the project, clone this repository :

$ [email protected]:julienhouyet/42-ft_printf.git

📦 Commands

To compile the library, run :

$ make

To re-compile the library :

$ make re

To wipes all object files :

$ make clean

To delete the library and all object files

$ make fclean

📄 Function in the library

✅ ft_printf

int ft_printf( const char *str, ... );

This ft_printf function supports several format specifiers, described below:

  • %c - Print a single character;
  • %s - Print a string;
  • %p - Print void * pointer argument in hexadecimal format;
  • %d - Print a decimal (base 10) number;
  • %i - Print an integer in base 10;
  • %u - Prints an unsigned decimal (base 10) number;
  • %x - Print a number in hexadecimal (base 16) lowercase format;
  • %X - Print a number in hexadecimal (base 16) uppercase format;
  • %% - Print a percentage sign;

About

🖨️ ft_printf was one of the first projects to be carried out at 42. The aim is to re-code the printf function in order to understand how it works. In future projects, the use of printf is forbidden, but we can use our own ft_printf function.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published