cparse
Synopsis:
$cparse(<text>
$cparse(
Technical:
This function parses
|
Any
|
instance
|
of
|
will
be replaced with
|
^C
codes to change
|
|
|
text
to
|
text
to
|
background
to
|
|||
|
%k
|
%K
|
%0
|
black
|
bold
black
|
black
|
|
%r
|
%R
|
%1
|
red
|
bold
red
|
red
|
|
%g
|
%G
|
%2
|
green
|
bold
green
|
green
|
|
%y
|
%Y
|
%3
|
yellow
|
bold
yellow
|
yellow
|
|
%b
|
%B
|
%4
|
blue
|
bold
blue
|
blue
|
|
%m
|
%M
|
%5
|
magenta
|
bold
magenta
|
magenta
|
|
%p
|
%P
|
purple
|
bold
purple
|
purple
|
|
|
%c
|
%C
|
%6
|
cyan
|
bold
cyan
|
cyan
|
|
%w
|
%W
|
%7
|
white
|
bold
white
|
white
|
|
%F
|
Flashing
attributes
|
turned
on
|
|||
|
%n
|
All
colors turned
|
off
|
|||
|
%N
|
Don't
put a clear
|
color
tag at the output
|
|||
|
%%
|
A
single %
|
If the first argument to $cparse( ) is an extended word (string with quotes), it will be parsed similar to bitchx. (example below)
Practical:
This is a convenient way add color to scripts without actually using the CTRL-C
character.
Returns:
parsed according to the rules in the above table
Examples:
$cparse(bl%Bah) returns bl^C4ah where ^C4 is the CTRL-C color code for
blue.
$cparse("This is a $0 test" cparse) returns This is a cparse test