Terminal colour

来自MudWiki

NAME

   terminal_colour - replaces codes in a string

SYNOPSIS

   string terminal_colour(string str, mapping m);
   string terminal_colour(string str, mapping m, int wrap);
   string terminal_colour(string str, mapping m, int wrap, int indent);

DESCRIPTION

   terminal_colour() replaces each occurrence of %^key%^ in str with 'value', where 'key' and 'value' are the elements in the mapping m.

   'wrap' is the optional column number to wrap at, and 'indent' is the amount to indent the second and following lines.  Codes are assumed to change the mode of the terminal and not generate any printable characters for the purposes of wrapping.

   This efun is only available if PACKAGE_CONTRIB is defined.

   Tim Hollebeek  Beek@ZorkMUD, Lima Bean, IdeaExchange, and elsewhere