Kbase P98750: Does the TRIM() function use pattern matching?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  04/03/2010 |
|
Status: Unverified
GOAL:
Does the TRIM() function use pattern matching?
FIX:
The TRIM() function does not use pattern matching.
The TRIM() function takes 2 parameters: a source string and an optional character-expression which will be used to remove characters from the source string. Note that the character-expression is treated as individual characters and not as a string pattern. The order of the characters in the search string is not relevant.
Example: DISPLAY TRIM("abcdefghijklm", "mlkcba") will result in "defghij".
TRIM() will scan the source string (from left to right and right to left, one character at a time) for occurances of any of the characters in the search string ("mlkcba") and it will remove each of these from the source string untill it finds no more matches. The TRIM() function will then stop scanning the source string. If the reverse version of the search string was used ("abcklm") the resulting output will still be the same ("defghij" ).