Command Reference : String and Date Function Reference
  
 
@wleft
Left-most words of string list.
Syntax: @wleft(str_list, n)
str_list: string
n: integer
Return: string
Returns a string list containing the left 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 = @wleft("I did not do it", 2)
string sc2 = @left(orig, 2)
return the string objects SC1 and SC2 containing the string “I did”.
If ALPHA1 is an alpha series,
alpha strleft = @left(alpha1, 3)
returns the left-most 3 words from the string values of ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector strleft = @left(svec1, 2)
returns an svector containing 2 words from the left end of each element of SVEC1.
Cross-references
See also @left, @wright and @wmid.