strings.split() function

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

Function type signature
(t: string, v: string) => [string]
For more information, see Function type signatures.



(Required) String value to split.


(Required) String value that acts as the separator.


Split a string into an array of substrings

import "strings"

strings.split(v: "foo, bar, baz, quz", t: ", ")// Returns ["foo", "bar", "baz", "quz"]

Was this page helpful?

Thank you for your feedback!

Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.