Code Monkey home page Code Monkey logo

printf's Introduction

_PRINTF

Duration of the project: 4 days in duo. Compile with Weverything

_printf is a mimic of the function printf from the <stdlib.h>. Our function uses a buffer in order to call write as little as possible. The function also handles field-width and precision.

On success, _printf print a string, or return -1 if the string FORMAT is empty or if any errors occurs.

OPTIONS

   Format can contain conversion specifier. These starts with '%' and are followed by :

   - d : convert a decimal number

   - i : convert a decimal number

   - c : print a char

   - s : print a string

   - r : print a string in reverse

   - R : convert a string in ROT13 encryption

   - B : convert a decimal number in binary

For exemples

_printf("%s School\n", "Holberton");

_printf("%r\n", "4days");

_printf("%R\n", "Cisfun?");

_printf("%b\n", 12);

_printf("%05d\n", 150);

will print

 Holberton School

 syad4

 Pvfsha?

 1100

 00150

in collaboration with Etienne for Holberton projects.

printf's People

Contributors

octavec avatar etiennebrj avatar

Watchers

 avatar

Forkers

etiennebrj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.