SYNOPSIS
	varargs string terminal_colour( string str, mapping map,
	                                int wrap, int indent )

DESCRIPTION
	Expands all colour-defines from the input-string and replaces them
        by the apropriate values found for the color-key inside the given
        mapping. The mapping has the format "KEY" : "value", non-string
	contents are ignored.

	The parameters wrap and indent are both optional, if only wrap is
	given then the str will be linewrapped at the column given with
	wrap. If indent is given too, then all wrapped lines will be
	indented with the number of blanks specified with indent.

	The wrapper itself ignores the length of the color macros and that
	what they contain, it wraps the string based on the length of the
	other chars inside. Therefor it is color-aware.

EXAMPLES
	mapping trans;
	string str;

	trans = ([ "GREEN" : "ansi-green", "RED" : "", "BLUE" : 1 ]);

	str = terminal_colour( "%^GREEN%^ and %^RED%^ and %^BLUE%^", trans );

	This will result in str == "ansi-green and  and BLUE"

	%^GREEN%^ is expanded to ansi-green because trans defines that,
	%^RED%^ is stripped because trans defines that as "" and
	%^BLUE%^ gets the %^'s removed because the contents of trans are
	not valid (i.e. no string). The same would happen to %^DEFINES%^
	where the key is not found inside the trans mapping.

	Some words about wrapping:

	a string wrapped without indent would look like this:

	"this is the first line\nand this is the second line"

	a string wrapped with indent 3 would look like:
	
	"this is the first line\n   and this is the indented second one"

AUTHOR
        Efun idea and implementation taken from MudOS.

SEE ALSO
