@str.join
Join array elements into a string with a delimiter.
Returns: string
Syntax
Section titled “Syntax”@str.join(arr delim)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr |
array |
Source array |
delim |
string |
Delimiter string |
Examples
Section titled “Examples”# Join array with commaset $parts ["a" "b" "c"]set $csv @str.join($parts ",")
# Join with spaceset $parts ["a" "b" "c"]set $spaced @str.join($parts " ")See Also
Section titled “See Also”- @str.split — split a string into an array
- @str.concat — concatenate strings