Xbasic
ALLTRIM Function
Syntax
Output_String as C = ALLTRIM(C character)
Arguments
- character
A character string.
Description
Trims leading and trailing spaces.
Discussion
ALLTRIM() removes leading and trailing blanks, (space and NULL characters) and CRLF and tabs from a Input_String. With any function that compares or searches for values, you may want to use ALLTRIM() so that you do not have to figure in blank spaces in order to find matching values. You also use ALLTRIM() within expressions that concatenate fields. This eliminates the blank spaces between the values that would otherwise result. For more information, see the TRIM()function description.
Example
dim PROD_NAME as C PROD_NAME = "Silver Fox Irons " ALLTRIM("Silver Fox Irons ") -> "Silver Fox Irons" SMATCH("Silver Fox Irons", PROD_NAME) -> FALSE SMATCH("Silver Fox Irons", ALLTRIM(PROD_NAME)) -> TRUE
See Also