Documentation

strings.split() function

The strings.split() function splits a string on a specified separator and returns an array of substrings.

Output data type: Array of strings

import "strings"

strings.split(v: "a flux of foxes", t: " ")

// 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
import "strings"

data
  |> map (fn:(r) => strings.split(v: r.searchTags, t: ","))

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: