From b8928bfa4cca767f716217d919c20ecd33524c7a Mon Sep 17 00:00:00 2001 From: sk-5 Date: Wed, 15 Jul 2015 11:37:58 -0700 Subject: [PATCH] Fixed README --- .gitignore | 1 - README | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 README diff --git a/.gitignore b/.gitignore index e455521..0684750 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,6 @@ config Makefile NEWS pipecolors.pc -README tests/test Makefile.in aclocal.m4 diff --git a/README b/README new file mode 100644 index 0000000..39cf6d7 --- /dev/null +++ b/README @@ -0,0 +1,41 @@ +******************* +** 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 ** +************************** + +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 ** +***************** + +#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