Support numbers and boolean in join (fix #930)

This commit is contained in:
David Tolnay committed 2015-10-25 12:40:15 -07:00
1 parent 8eb1367ca4
commit e17ccf2297
3 files changed
+31 -6

No files matched your search

+7 -1
View File
@@ -1446,11 +1446,17 @@ sections:
running `split("foo") | join("foo")` over any input string
returns said input string.
Numbers and booleans in the input are converted to strings.
Null values are treated as empty strings. Arrays and objects
in the input are not supported.
examples:
- program: 'join(", ")'
input: '["a","b,c,d","e"]'
output: ['"a, b,c,d, e"']
- program: 'join(" ")'
input: '["a",1,2.3,true,null,false]'
output: ['"a 1 2.3 true false"']
- title: "`ascii_downcase`, `ascii_upcase`"
body: |