Syntax:
Then: xx = XLATE(text_expr,from_expr,to_expr)
"text_expr" is the string to edit.
"from_expr" is a list of characters to translate from.
"to_expr" is a corresponding list of characters to translate to.
Return value:
A copy of the original string, with each character translated as appropriate.
NOTE: If from_expr is longer than to_expr, then any character found in from_expr beyond that length will be deleted from the resulting string.
Version Ref: 4.5
Description:
Translates individual characters in a text string to other characters.
Examples:
Convert backslashes to forward slashes, braces to brackets, and eliminate some punctuation marks.
Then: newname = XLATE(oldname,"\ { } !@#$%","/[]")
Eliminate parentheses and dashes from a phone number, leaving just the digits. Then dial the number.
Then: outs "ATDT" & XLATE(phone,"()- ","") & chr("13")
Note that the file I/O functions cannot be used to access any file with a name formatted as a filePro file. For example, you cannot access a file named "screen.1." "Index.A," or "key."