The Translate function returns a translation of the characters in an original string.
result = Translate( string [, [after] [, [before] [, pad ] ] ] ) |
When both before and after arguments are absent, the function converts the original string to upper case.
Examples:
say Translate( 'abracadabra' ) -- shows: ABRACADABRA say Translate( '01101', '01', '10' ) -- shows: 10010, same as BitXor( '01101' ) say Translate( 'abracadabra', 'ba', 'ab' ) -- shows: barbcbdbarb say Translate( 'abracadabra', , 'ab' ) -- shows: ' r c d r ', (notice the absence of the before argument!) say Translate( 'abracadabra', , 'a', '+' ) -- shows: +br+c+d+br+, (notice the absence of the before argument!) say Translate( 'AbraCaDabra', xrange( 'a', 'z' ), xrange( 'A', 'Z' ) )
LowerEbcdic : procedure
|