Command Reference : String and Date Function Reference
  
 
@wmid
Middle words of a string list.
Syntax: @wmid(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 “double 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.
alpha strleft1 = @wmid(alpha1, ser1)
returns the remaining words beginning with the word specified in the series SER1.
If SVEC1 is an string vector,
svector strleft = @wmid(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.