Command Reference : String and Date Function Reference
Word from 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.
@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 = @word(alpha1, 3)
returns the potentially quoted third word of the string lists in ALPHA1, while
alpha str2 = @word(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 = @wnotin(svec1, 5)
returns an svector with the potentially quoted fifth word in each element of SVEC1”.
See also @word.