TRANSLATE
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Translates each character in char_expression that is in from_set to the corresponding character in to_set. The translated character string is returned as the result.
Syntax
|
Notes
- char_expression, from_set, and to_set can be any character expression.
- For each character in char_expression,
TRANSLATEchecks for the same character in from_set. - If it is in from_set,
TRANSLATEtranslates it to the corresponding character in to_set (if the character is thenth character in from_set, thenth character in to_set). - If the character is not in from_set
TRANSLATEdoes not change it. - If from_set is longer than to_set,
TRANSLATEdoes not change trailing characters in from_set that do not have a corresponding character in to_set. - If either from_set or to_set is
NULL,TRANSLATEdoes nothing.
Example
This example substitutes underscores for spaces in customer names:
|
Compatibility
Progress extension