The TRIMF function removes any leading blank spaces from the given string.
Format
TRIMF(expr) |
Parameter(s)
expr |
An expression evaluating to the string to be trimmed. |
Description
The TRIMF function removes all leading spaces. Any spaces embedded in the string or trailing the string are left intact.
Example
In this application, the customer’s name is entered last name first. The last name is used as an item-ID, and the first name becomes the first attribute of the file item. The field function separates the last name from the first name, and the TRIMF function removes the leading space that generally follows the comma.
PRINT "ENTER YOUR NAME (LAST NAME, FIRST NAME): ": INPUT NAME ITEM.ID = FIELD(NAME , " , " , 1) ITEM.ID = TRIM(ITEM.ID) FIRST.NAME = FIELD(NAME , " , " , 2) FIRST.NAME = TRIMF(FIRST.NAME) |
See Also