libpipecolors/params.json

1 line
1.1 KiB
JSON
Raw Normal View History

2015-07-15 09:11:03 -07:00
{"name":"Libpipecolors","tagline":"linux color code library","body":"# libpipecolors\r\n\r\n\r\nThis 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.\r\n \r\n## It has two functions -\r\n```c++\r\nint pcprintf(const char * format, ...);\r\nint pcsprintf(char * str, const char * format, ...);\r\n```\r\n### To Do\r\n- [x] Remove std::map requirement\r\n- [ ] Remove boost requirement without forcing `-std=c++11`\r\n\r\n## Example use\r\n\r\n```c++\r\n#include <cstdio>\r\n#include <iostream>\r\n#include <pipecolors.h>\r\n\r\nusing namespace pipecolors;\r\n\r\nint main(void) {\r\n\r\n int num = 5;\r\n const char* str = \"My number is\";\r\n pcprintf(\"|02%s |10%d|39\\n\", str, num);\r\n\r\n return 0;\r\n}\r\n```\r\nThis would return `\\x1b[0;32mMy number is \\x1b[0;92m5\\x1b[0;39m\\n`,\r\n\r\nPrinting str in <span style=\"color:#009900;\">*dark green*</span> and num in <span style=\"color:#00FF00;\">*light green*</span>\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}