Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Tools : PEEL_TAIL

PEEL_TAIL
Removes the specified trailing characters from a given string. (F)
Invocation
startstring = PEEL_TAIL(char, string)
 
The string returned after all occurrences of char are removed from the end of string.
Usage Notes
char cannot contain the cent character.
Example
The following rule removes periods and trailing blanks from the end of addresses in the EMPLOYEE table:

 
RULE EDITOR ===> SCROLL: P
TRIM_ADDRESS;
_
_ ---------------------------------------------------------------------------
 _ ---------------------------------------------------------------------------
_ FORALL EMPLOYEE : | 1
_ CALL MSGLOG(PEEL_TAIL(' .', EMPLOYEE.ADDRESS)); |
_ END; |
_ ---------------------------------------------------------------------------

 
Source Data
The addresses in the table look like the following:

 
ADDRESS
------------------------------
23 Irvine Rd.
2076 Chappel Dr.
335 Princess St.
215 Rogers Ave.

 
Resultant Data
They appear in the message log like the following:

 
23 Irvine Rd
2076 Chappel Dr
335 Princess St
215 Rogers Ave

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved