Skip to content

lvndry/tinyprintf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tinyprintf

Minimal implementation of printf from stdio.h

Protoype: tinyprintf(const char *fmt, ...)

Usage

make

or

gcc -L . -l:libprintf.a <file.c> tinyprintf.c utils.c buffer.c
#include "tinyprintf.h"
...
tinyprintf("Hello World"); // "Hello World"
tinyprintf("Hey, C is %s!", "cool"); // "Hey C is cool"
tinyprintf("%%"); // "%"
tinyprintf("%x\n", 3405691582);  // "cafebabe"

Possible wildcards

wildcard type
%c char
%s char*
%d int
%u unsigned
%o octal
%x hexadecial

About

Reimplementation of printf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors