---
title: strings.splitAfter() function
description: strings.splitAfter() splits a string after a specified separator and returns an array of substrings. Split substrings include the separator, t.
url: https://docs.influxdata.com/flux/v0/stdlib/strings/splitafter/
estimated_tokens: 628
product: Flux
version: v0
---

# strings.splitAfter() function

-   Flux 0.18.0+
-   View InfluxDB support

`strings.splitAfter()` splits a string after a specified separator and returns an array of substrings. Split substrings include the separator, `t`.

##### Function type signature

```js
(t: string, v: string) => [string]
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### v

(Required) String value to split.

### t

(Required) String value that acts as the separator.

## Examples

### Split a string into an array of substrings

```js
import "strings"

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

```

#### Related

-   [strings.split() function](/flux/v0/stdlib/strings/split/)
-   [strings.splitAfterN() function](/flux/v0/stdlib/strings/splitaftern/)
-   [strings.splitN() function](/flux/v0/stdlib/strings/splitn/)
