Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : PEEL_HEAD

PEEL_HEAD
Removes the specified leading characters from a given string. (F)
Invocation
endstring = PEEL_HEAD(char, string)
 
The string returned after all occurrences of char are removed from the beginning of string.
Usage Notes
char cannot contain the cent character.
Example
This rule removes leading blanks from last names in the EMPLOYEE table:

 
RULE EDITOR ===> SCROLL: P
TRIM_NAME;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ FORALL EMPLOYEE : | 1
_ CALL MSGLOG(PEEL_HEAD('', EMPLOYEE.LNAME)); |
_ END; |
_ ---------------------------------------------------------------------------

 
Source Data
The last names in the table look like the following:

 
LNAME
-------------------------
DRABEK
ROEDER
HOEGSON
GLADWELL
URBANEK
TERAMURA
LEES

 
Resulting Data
After using the rule they appear in the message log like this:

 
DRABEK
ROEDER
HOEGSON
GLADWELL
URBANEK
TERAMURA
LEES

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved