Command Reference : String and Date Function Reference
  
 
@wunion
Union of words in two string lists.
Syntax: @wunion(str_list1, str_list2)
str_list1: string
str_list2: string
Return: string
Returns the elements that are in either str_list1 and str_list2. This function is case-sensitive.
Examples
 
 
@wunion("ABC DEF", "ABC G H def")
returns the string “ABC DEF G H def”. Each new element is added to the string list, skipping elements that have already been added to the list.
If ALPHA1 and ALPHA2 are alpha series,
alpha a1 = @wunion(alpha1, alpha2)
returns the union of values for elements of ALPHA1 and ALPHA2 for each observation in the workfile sample.
If SVEC1 and SVEC2 are string vectors,
svector s1 = @wunion(svec1, svec2)
returns an svector containing the union of the elements in SVEC1 and SVEC2 for each element of the svectors.
Cross-references
See also @wcross, @wintersect, and @winterleave.