Command Reference : Function Reference : Function Reference: W
  
 
@wmid
Middle or middle to end words of a string list.
Syntax: @wmin(str_list, n1[, n2])
str_list: string
n1: integer
n2: (optional) integer
Return: string
Returns n2 elements from str_list, starting at element n1 and continuing to the right for n2 elements. If you omit n2, the function will return all of the remaining elements in the string.
Examples
The command
string s1 = @wmid("I really don’t doubt it", 4)
assigns “doubt it” to the string object S1, while
string s2 = @wmid("I really doubt it", 2, 2)
assigns “really doubt” to S2.
If ALPHA1 is an alpha series,
alpha strleft = @wmid(alpha1, 3)
returns the remaining words beginning with the 3rd from the string values of ALPHA1, for each observation in the workfile sample.
If SVEC1 is an string vector,
svector strleft = @mid(svec1, 4, 2)
returns an svector beginning at the 5th for 2 words for each element of SVEC1.
Cross-references
See also @mid, @wleft and @wright.