content/flux/v0/stdlib/strings/splitaftern.md
strings.splitAfterN() splits a string after a specified separator and returns an array of i substrings.
Split substrings include the separator, t.
(i: int, t: string, v: string) => [string]
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
({{< req >}}) String value to split.
({{< req >}}) String value that acts as the separator.
({{< req >}}) Maximum number of split substrings to return.
-1 returns all matching substrings.
The last substring is the unsplit remainder.
import "strings"
strings.splitAfterN(v: "foo, bar, baz, quz", t: ", ", i: 3)// Returns ["foo, ", "bar, ", "baz, quz"]