Chapter Contents |
Previous |
Next |
TRIMN |
Category: | Character |
Syntax | |
Arguments | |
Details | |
Comparisons | |
Examples | |
See Also |
Syntax |
TRIMN(argument) |
Details |
TRIMN copies a character argument, removes all trailing blanks, and returns the trimmed argument as a result. If the argument is blank, TRIMN returns a null string. TRIMN is useful for concatenating because concatenation does not remove trailing blanks.
Assigning the results of TRIMN to a variable does not affect the length of the receiving variable. If the trimmed value is shorter than the length of the receiving variable, SAS pads the value with new blanks as it assigns it to the variable.
Comparisons |
Examples |
SAS Statements | Results |
---|---|
x="A"||trimn("")||"B"; put x; |
AB |
x=" "; z=">"||trimn(x)||"<"; put z; |
>< |
See Also |
Functions:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.