Trim left and right whitespace.
Syntax: @trim(str)
str: string
Return: string
Returns the string str with spaces trimmed from the left and the right.
Examples
@ltrim(" I doubt that I did it. ")
returns “I doubt that I did it.” after trimming off spaces from both ends.
If ALPHA1 is an alpha series,
alpha alphaltrim = @trim(alpha1)
returns the left and right-trimmed strings in ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector sveclen = @trim(svec1)
returns a string vector containing the left and right-trimmed elements of SVEC1.
Cross-references
See also
@ltrim and
@rtrim.