The STRTRIM function returns a copy of String with leading and/or trailing blanks removed.
The string to have leading and/or trailing blanks removed. If this argument is not a string, it is converted using IDL's default formatting rules. If it is an array, the result is an array with the same structure where each element contains a trimmed copy of the corresponding element of String .
Converting variables to string type often results in undesirable leading blanks. For example, the following command converts the integer 56 to string type:
which shows that there are six leading spaces before the characters 5 and 6. To remove these leading blanks, enter the command: