Berserk Docs
Scalar FunctionsString Functions

split

Splits a string by a delimiter and returns an array.

Syntax

split(source, delimiter, index)

Parameters

Prop

Type

Returns: dynamic

Examples

Example 1 — Split a voyage route into its ports of call

print split("Kattegat-Hedeby-York-Dublin", "-")
print_0 (dynamic)
["Kattegat","Hedeby","York","Dublin"]

Example 2 — Split and expand into individual rows

datatable(route:string)[
  "Kattegat-Hedeby-York"
]
| extend ports = split(route, "-")
| mv-expand ports
route (string)ports (dynamic)
Kattegat-Hedeby-York"Hedeby"
Kattegat-Hedeby-York"Kattegat"
Kattegat-Hedeby-York"York"

On this page