simply construct to put colorful string to console
table of Contents(out of data)
There are serval ways to incorporate cMENU into your projects
The entire library is only one C file and one Header file,you can just copy the ccRainbow.h
and ccRainbow.c
to your projects source and start using it.
You could include cMENU like this:
#include "ccRainbow.h"
cRainbowconsole is written in ANSI C (C89) in order to support as many platforms and compilers as possible.
There is no struch you need to learn
rainbow_print
chinese_support();
statament at the most top of your code.VERSION()
.You can just simply use ccRainbowconsole like printf
The statament
rainbow_print("{red}hello {blue}world {green}%d",2020);
will output:
If you want to output '{' or '}' you need to char "\{"("\}") or "{"("}")
From version:0.1.2 you could use all format_control_token in printf()
MIT License
Copyright (c) 2020 GuoZi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if your output did not colorful,you need to check here.
On OS windows,the color could only display on cmd\shell or other application that use win32.api
On OS [OS X,Linux,unix] you should check your application whether compiled on the os you are using.
Now ,the cRainbowconsole could not parser format control token the following token [%m.n*]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。