@str.split
Split a string by a delimiter into an array of strings.
Returns: array
Syntax
Section titled “Syntax”@str.split(s delim)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
s |
string |
Source string |
delim |
string |
Delimiter string |
Examples
Section titled “Examples”# Split by commaset $parts @str.split("a,b,c" ",")
# Split by spaceset $words @str.split("hello world" " ")See Also
Section titled “See Also”- @str.join — join array into a string