strings.splitAfter() function

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*

  1. import "strings"
  2. strings.splitAfter(v: "a flux of foxes", t: " ")
  3. // returns ["a ", "flux ", "of ", "foxes"]

Parameters

v

The string value to split.

*Data type: String*

t

The string value that acts as the separator.

*Data type: String*

Examples

Split a string into an array of substrings
  1. import "strings"
  2. data
  3. |> map (fn:(r) => strings.splitAfter(v: r.searchTags, t: ","))

Related articles