Command Reference : String and Date Function Reference
  
 
@wright
Right-most words of a string list.
Syntax: @wright(str_list, n)
str_list: string
n: integer
Return: string
Returns a string list containing the right n word elements of string list str_list. If the string list str_list is shorter than n elements, this function returns all of the elements in the source string.
Examples
The commands
string orig = "I did not do it"
string sc1 = @wright("I did not do it", 2)
string sc2 = @right(orig, 2)
return the string objects SC1 and SC2 containing the string “do it”.
If ALPHA1 is an alpha series,
alpha strrght = @right(alpha1, 3)
returns the right-most 3 words from the string values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector strrght = @right(svec1, 2)
returns an svector containing 2 words from the left end of each element of SVEC1.
Cross-references
See also @wright, @wleft and @wmid.