translate >>-translate-+--------------------------------------------------------------------------+->< +-(--+-------------------------------------+-+-----------------------+-)---+ +-tableo--+-------------------------+-+ +-,--+---+--+---------+-+ +-,--+--------+--+------+-+ +-n-+ +-,length-+ +-tablei-+ +-,pad-+ Returns the receiving buffer with each character translated to another character or unchanged. The output table is [tableo] and the input translation table is [tablei] . [translate] searches [tablei] for each character in the receiving buffer. If the character is found, the corresponding character in [tableo] is replaces the character in the buffer. If there are duplicates in [tablei] , the first (leftmost) occurrence is used. If the character is not found, the original character in the receiving buffer is unchanged. The tables can be of any length. If you specify neither translation table and
omit
[pad]
, the receiving string is
translated to uppercase (that is, lowercase
[n] is the position of the first character of the translated range. The default starting position is 1. [length] is the range of characters to be translated. If omitted, [length] remainder of the buffer from the starting position to the end is used. |