Description:
Translate a specified
set of characters within a string. The character translation is controlled by the translation
table given by the character strings FROM and TO. Any characters not appearing in the
translation table are left unchanged. If the status is set on entry, no action is taken. If the strings
FROM and TO are unequal in length, STATUS is returned set to SAI__ERROR.
Invocation
CALL CHR_TRCHR( FROM, TO, STRING, STATUS )
Arguments
FROM = CHARACTER
∗ (
∗ )
(Given)
A string specifying the characters to be translated.
TO = CHARACTER
∗ (
∗ )
(Given)
A string specifying the translation values for each of the characters in the FROM argument.
The lengths of the FROM and TO arguments must be the same.
STRING = CHARACTER
∗ (
∗ )
(Given and Returned)
The string to be translated. Any character matching one of the characters
specified in the FROM argument is converted to the corresponding character specified in the TO
argument. All other characters are left unchanged.
STATUS = INTEGER (Given and Returned)
The global status: returned set to SAI__ERROR if FROM and TO have unequal lengths.
Copyright © 2018 East Asian Observatory