ZT - Translate.

Syntax:

ZT/str1/str2/

Examples:

zt/a/A/
3,5zt,123456789,abcdefghi,
zt;+-;-+;

Options:

/
It is general practice to use / as a delimiter in many commands. However, any non-alphanumeric character can also be used. The final delimiter may be omitted if O-S/ is in effect and the ZT command is immediately followed by a new-line.
str1,str2
are two strings of characters. str1 must be the same length as str2 and no character in str1 may occur more than once.

Description:

ZT scans one or more lines and converts each character in str1 into its corresponding character in str2. For example, the command

zt/123456789/ABCDEFGHI/

converts 1 into A, 2 into B, 3 into C and so on.

If you do not specify an address, ZT only translates the current line. If you specify one address, ZT translates that line. If you specify two addresses, ZT translates all the lines between and including the given lines. In this case, the first address must precede the second in the buffer.

If ZT does not convert any characters in the addressed lines, an error is issued unless the command was executed from a buffer. ZT sets the condition register FALSE if no characters are translated, and TRUE otherwise. ZT sets the count register to the number of lines translated.

ZT sets "." to the last line in which a character was converted. If no conversions were made, "." is unchanged.

Copyright © 1998, Thinkage Ltd.