Array.join
joinseparatorprefixsuffix
Group: Calculations
Documentation
When self
is an array of text values, concatenates all the values by interspersing them with separator
.
Arguments
separator (optional)
: The text to use to join the textual elements of the array.prefix (optional)
: The prefix to add at the beginning.suffix (optional)
: The suffix to add at the end.
Examples
Join the elements of the array together as a string.
["foo", "bar", "baz"].to_array.join ", "