Command Reference : String and Date Function Reference
  
 
@wdelim
Replace delimiters.
Syntax: @wdelim(str_list, src_delim, dest_delim)
str_list: string
src_delim string
dst_delim string
Return: string
Returns a string list, replacing every appearance of the src_delim delimiter in str_list with a dst_delim delimiter. Delimiters must be single characters.
Note that most other string list functions (those beginning with “@w”) require that the delimiter be a space (“ ”). Use this function to convert strings with other delimiters into those which can be used with the string list functions.
Examples
@wdelim("Arizona, California, Washington", ",", "-")
identifies the comma as the source delimiter and replaces each comma with a dash, returning the string “Arizona-California-Washington”.
If ALPHA1 is an alpha series,
alpha alphad = @wdelim(alpha1, ",", ":")
replaces each “,” with “:” in the string lists in ALPHA1, for each observation in the workfile sample.
If SVEC1 is a vector,
svector svecd = @wdelim(svec1, ",", ";")
replaces each delimiter “,” with “;” in the string lists in SVEC1 for each element.
Cross-references
See also @wreplace and @replace.