1.2 KiB
1.2 KiB
title | description | aliases | menu | weight | related | introduced | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strings.splitAfter() function | The strings.splitAfter() function splits a string after a specified separator and returns an array of substrings. |
|
|
301 |
|
0.18.0 |
The strings.splitAfter()
function splits a string after a specified separator and returns
an array of substrings.
Split substrings include the separator, t
.
Output data type: Array of strings
import "strings"
strings.splitAfter(v: "a flux of foxes", t: " ")
// returns ["a ", "flux ", "of ", "foxes"]
Parameters
v
The string value to split.
t
The string value that acts as the separator.
Examples
Split a string into an array of substrings
import "strings"
data
|> map (fn:(r) => strings.splitAfter(v: r.searchTags, t: ","))