Command Reference : String and Date Function Reference
  
 
@addquotes
Enclose string in quotation marks.
Syntax: @addquotes(str)
str: string
Return: string
Returns the contents of the string in str with double-quotation marks added to both the left and the right.
Examples
Define the string object
string s1 = "Chicken Marsala"
so that S1 contains the unquoted string “Chicken Marsala”.
Then the commands
string sq1 = """Chicken Marsala"""
string sq2 = @addquotes(s1)
create SQ1 and SQ2 which both contain the quoted string “"Chicken Marsala"”. The first command uses the double-quote escape sequence “""” to add the double-quotes. The latter command uses the function.
If ALPHSER is an alpha series, the command
alpha a1 = @addquotes(ALPHSER)
fills A1 with double-quoted values of ALPHSER for each observation in the workfile sample.
If AVEC is an svector, the commands
svector as1 = @addquotes(avec)
svector as2 = @addquotes(avec.@rows(@range(1, 3))
create svectors AS1 and AS2, where AS1 contains double-quoted values of AVEC, and AS2 contains double-quoted values of the first three rows of AVEC.
Cross-references
See also @stripquotes.