Command Reference : String and Date Function Reference
Trim right whitespace.
Syntax: @rtrim(str)
str: string
Return: string
Returns the string str with spaces trimmed from the right.
@rtrim("  I doubt that I did it.  ")
returns the string “  I doubt that I did it.”. Note that the spaces on the left remain.
If ALPHA1 is an alpha series,
alpha alphaltrim = @rtrim(alpha1)
returns the right-trimmed strings in ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector sveclen = @ltrim(svec1)
returns a string vector containing the right-trimmed elements of SVEC1.
See also @ltrim and @trim.