TRIMW(), TRIMWS() |
|
|
The TRIMW() function removes excess whitespace characters from a string. The TRIMWS() function is similar to TRIMW() but operates on each element of a dynamic array and returns an equivalently structured dynamic array of trimmed strings.
Format
TRIMW(string)
where
The TRIMW() function removes all leading and trailing whitespace from string and replaces multiple embedded whitespace characters with a single space (character 32).
In the non-ECS version of QM, whitespace corresponds to the space and tab characters. In the ECS version, the whitespace attribute is defined by the currently loaded character map.
Example
X = " 1" : CHAR(9) : "2 3 " Y = TRIMW(X)
This program fragment removes excess spaces from string X setting Y to "1 2 3"
See also: |