Text Macros
The macros in the sample text_macros.cfg configuration file below are for specifying common text elements, also as quasi string functions.
/////////////////////////////////////////////////////////////////////////////// // text macros /////////////////////////////////////////////////////////////////////////////// strip(S, C) // strip all instances of string C (usually just a single // char) from string S, returning the stripped string $substitute((S), (C), "") /////////////////////////////////////////////////////////////////////////////// chop(S) // like Perl's chop, chop the last char off of string S set (S) = $chop((S)) /////////////////////////////////////////////////////////////////////////////// chomp(S, C) // sort of like Perl's chomp, chop the last char off of // string S if it's a (C) if $right((S),1) eq (C) set (S) = $chop((S)) fi /////////////////////////////////////////////////////////////////////////////// border $repeat($char(47), 79) /////////////////////////////////////////////////////////////////////////////// newline $newline() // nl =newline // defined in macros/doc_pikt_macros.cfg // but not universally ///////////////////////////////////////////////////////////////////////////////
For more examples, see Samples.