STR QUOTEARGS()
From Lianjapedia
Contents
Purpose
Function to place quotes around each item in a comma separated list
Syntax
STR_QUOTEARGS(<expC>)
See Also
AT(), ATNEXT(), FLDLIST(), GETPARAMETER(), INLIST(), LEFT(), MTOS(), OCCURS(), RAT(), RIGHT(), RPAD(), SET STRESCAPE, STR(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()
Description
The STR_QUOTEARGS() function returns a character string with quotes placed around each item in the comma separated list source character string <expC>.
It is particularly useful when parsing parameters passed to .rsp pages handled by the GETPARAMETER() function.
Example
open database southwind use shippers ? fldlist() shipperid,companyname,phone ? str_quoteargs(fldlist()) 'shipperid','companyname','phone'
// library:/chartview.rsp // ... // get parameters local p_sectionid = getParameter("sectionid", "") local p_charttype = getParameter("charttype", "pie") local p_labels = getParameter("labels", "'red','green','blue', 'rgba(255, 99, 132, 0.2)'") p_labels = str_quoteargs(p_labels) local p_caption = getParameter("caption", "# of Votes") local p_backgroundcolors = getParameter("backgroundcolors", "'rgba(255, 99, 132, 1)'; ,'rgba(54, 162, 235, 1)','rgba(255, 206, 86, 1)'") p_backgroundcolors = str_quoteargs(p_backgroundcolors) local p_bordercolors = getParameter("bordercolors", "'rgba(255, 99, 132, 1)'; ,'rgba(54, 162, 235, 1)','rgba(255, 206, 86, 1)'") p_bordercolors = str_quoteargs(p_bordercolors) // ...