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.
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.
X = " 1" : CHAR(9) : "2 3 "
Y = TRIMW(X)
This program fragment removes excess spaces from string X setting Y to "1 2 3"