parameter set
This function converts a value provided to a parameter set.
In case of converting strings: The input string may be embedded in braces ("{ … }" ) or not. The elements must be separated with commas. The number of opening and closing braces must be equal. Braces inside quotation marks are considered as part of a text element to include.
Any additional or missing characters (incl. spaces) will suppress automatic date conversion. If you have other date formats (e.g. MM/DD/YY, hh:mm), convert them by dates afterwards with the date(…) function.
Reason: Strings in conversion from parameter sets to string will be put into single quotation marks and internal single quotation marks needed to be encoded to avoid confusion with closing quotation marks
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
valid types | Value Value to be converted as described above. |
Type | Description |
---|---|
parameter set | Result Identified parameter set |
echo( parameter set ( "{a,1,{true,TRUE,false}} " ) ); // {{'a',1,{true,'TRUE',false}}}
echo( parameter set ( "a,1,{true,TRUE,false} " ) ); // {'a',1,{true,'TRUE',false}}
echo( parameter set ( "2019-07-14,10:30:00" ) ); // 2 date values: { 2019-07-14,10:30:00 }
echo( type( parameter set ( "2019-07-14,10:30:00" ){0} ) ); // Check type of date
echo( parameter set ( "2019/07/14,10:30" ) ); // 2 strings: { '2019/07/14','10:30' } (not qualified as dates)
echo( parameter set ( "{a,,b}" ) ); // 4 strings: { 'a','','','b' } (2 strings are blank)
{{'a',1,{true,'TRUE',false}}}
{'a',1,{true,'TRUE',false}}
{'2019-07-14','10:30:00'}
date
{'2019/07/14','10:30'}
{'a','','b'}