Command Reference : Function Reference : Function Reference: W
  
 
@wordq
Single word from a string list, preserving quotes.
Syntax: @wordq(str_list, n)
str_list: string
n: integer
Return: string
Returns the n-th element from the string list str_list, retaining surrounding double-quotes. This function is the same as the @word function, but preserving quotes.
Examples
 
@wordq("""Chicken Marsala"" ""Beef Stew""", 2)
returns the second element, ‘“Beef Stew”’ including the surrounding double-quotes.
If ALPHA1 is an alpha series,
alpha str1 = @wordq(alpha1, 3)
returns the potentially quoted third word of the string lists in ALPHA1, while
alpha str2 = @wordq(alpha1, ser1)
returns the potentially quoted word in the string lists in ALPHA1 given by the integers in the series SER, for each observation in the workfile sample.
If SVEC1 is an string vector,
svector str3 = @wordq(svec1, 5)
returns an svector with the potentially quoted fifth word in each element of SVEC1”.
Cross-references
See also @word.