Skip to content

Commit 399bbf1

Browse files
authored
Fix array_to_string description and add default value example
1 parent 8e8f4a5 commit 399bbf1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "array_to_string",
33
"type": "function",
4-
"description": "Concatenates array elements into a string separated by a delimiter using and optional string for empty values.",
4+
"description": "Concatenates array elements into a string separated by a delimiter and using optional string for empty values.",
55
"arguments": [
66
{"arg":"array", "description":"the input array"},
77
{"arg":"delimiter","optional":true,"default":"','","description":"the string delimiter used to separate concatenated array elements"},
88
{"arg":"empty_value","optional":true,"default":"''","description":"the optional string to use as replacement for empty (zero length) matches"}],
9-
"examples": [ { "expression":"array_to_string(array('1','2','3'),',')", "returns":"'1,2,3'"},
9+
"examples": [ { "expression":"array_to_string(array('1','2','3'))", "returns":"'1,2,3'"},
10+
{ "expression":"array_to_string(array(1,2,3),'-')", "returns":"'1-2-3'"},
1011
{ "expression":"array_to_string(array('1','','3'),',','0')", "returns":"'1,0,3'"}
1112
]
1213
}

0 commit comments

Comments
 (0)