2016-10-27 13:53:58 +07:00
|
|
|
{
|
|
|
|
"name": "array_to_string",
|
|
|
|
"type": "function",
|
2018-08-24 11:54:34 +02:00
|
|
|
"description": "Concatenates array elements into a string separated by a delimiter and using optional string for empty values.",
|
2016-10-27 13:53:58 +07:00
|
|
|
"arguments": [
|
|
|
|
{"arg":"array", "description":"the input array"},
|
|
|
|
{"arg":"delimiter","optional":true,"default":"','","description":"the string delimiter used to separate concatenated array elements"},
|
2016-11-05 11:21:13 +07:00
|
|
|
{"arg":"empty_value","optional":true,"default":"''","description":"the optional string to use as replacement for empty (zero length) matches"}],
|
2018-08-24 11:54:34 +02:00
|
|
|
"examples": [ { "expression":"array_to_string(array('1','2','3'))", "returns":"'1,2,3'"},
|
|
|
|
{ "expression":"array_to_string(array(1,2,3),'-')", "returns":"'1-2-3'"},
|
2016-10-27 13:53:58 +07:00
|
|
|
{ "expression":"array_to_string(array('1','','3'),',','0')", "returns":"'1,0,3'"}
|
|
|
|
]
|
|
|
|
}
|