From d6e5df076784c862acb54cba3c3df2b06ff62d07 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 15 Jul 2015 08:56:02 -0700 Subject: [PATCH] Finally update README.md Finally update README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 1dff35c..c438831 100644 --- a/README.md +++ b/README.md @@ -1 +1,34 @@ # libpipecolors + + +This library parses input like **_printf_** and **_sprintf_** but instead of returning a boring string it will replace renegade bbs style pipecodes (|09) with their ansi equivelent. + +## It has two functions - +```c++ +int pcprintf(const char * format, ...); +int pcsprintf(char * str, const char * format, ...); +``` +### To Do +- [x] Remove std::map requirement +- [ ] Remove boost requirement without forcing `-std=c++11` + +## Example use + +```c++ +#include +#include +#include + +using namespace pipecolors; + +int main(void) { + + int num = 5; + const char* str = "My number is"; + pcprintf("|02%s |10%d|39\n", str, num); + + return 0; +} +``` +This would return `\x1b[0;32mMy number is \x1b[0;92m5\x1b[0;39m\n`, +Printing str in *dark green* and num in *light green*