join

join collection of values into string


Parameters

join collection :literal :pathliteral :block

Attributes

with:char, :stringuse given separator
pathjoin as path components

Returns

  • :string
  • or  :nothing

Examples

copy
arr: ["one" "two" "three"] print join arr ; onetwothree print join.with:"," arr ; one,two,three join 'arr ; arr: "onetwothree"

copy
print join ['H' 'e' 'l' 'l' 'o' '!'] ; Hello! print join @["1 + 2 = " 1+2] ; 1 + 2 = 3

copy
join.with:'-' ["Hello" "world"] ; => "Hello-world"

Related