Close
To suscribe Cquery.h please enter your email below..
After suscribing kindly check your mail box immediately
to complete your suscription.
I don't want any update | Let me download
Cquery.h
Code less C fast..
Download v0.1
Cquery.h is written by a student of SSUET by keeping TURBOC compiler in his mind only.
All the code are copyrighted so please respect other's efforts :) and don't distribute Cquery.h with your name.
Thanks.

Saturday, 5 April 2014

color_str(color,string)

color_str is a function to give available color to a string. It takes two arguments both of type string.
First argument is to set color. You can check complete list of available colors in Cquery [here].
Second argument is your string which you want to colorized.


Syntax:


color_str(color,string);

Examples:


#include<cquery.h>
void main(void)
{
color_str("blue","hello world");
}

color argument is case insensitive as
#include<cquery.h>
void main(void)
{
color_str("blue","hello world"); // all will work :)
color_str("blUE","hello world");
color_str("BLUE","hello world");
}

Its also possible
#include<cquery.h>
void main(void)
{
char q[10] = "hello"; //every possibility up to you what you like most:)
char *p = "hello";
color_str("blue","hello world"); 
color_str("blUE",q);
color_str("BLUE",p);
}

No comments:

Post a Comment