---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, PMD Scripting, Scripts]
nav: wcp_docs
parent_url: /wcp_docs/
title: split (separatorChars)
layout: subsection
---

## <a id="section_m3p_myb_5db"></a>Description

Splits the string into a list, separated by the specified character. Returns null if the input string is null. The output list doesn't include any empty string.

## <a id="section_cyq_j1m_zsb"></a>Return Type

`List`

## <a id="section_dz5_pwg_5db"></a>Instance Method Syntax

```
thisString.split(separatorChars)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>separatorChars</td><td>The separator characters to match. <p>If you specify multiple separator characters, the <code>split</code> function splits the string by either of the single characters in <code>separatorChars</code>. Example: <i>thisString.split('ab')</i> splits <i>thisString</i> by either <i>a</i> or <i>b</i>. If you need to separate the string by all characters, use the <a href="/wcp_docs/vmr1676494770348.html">splitByRegex (regex)</a> function.</p></td></tr></tbody></table><br/>

<b>Example</b>

`'The quick brown fox'.split(' ')`

Returns `['The', 'quick', 'brown', 'fox']`

## <a id="section_dz5_pwg_5d"></a>Namespace Function Syntax

```
string:split(string, separatorChars)
```

<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td>string</td><td>The input String.</td></tr><tr><td>separatorChars</td><td>The separator characters to match.</td></tr></tbody></table><br/>

<b>Example</b>

`string:split('boo:and:foo', ':')`

Returns `['boo', 'and', 'foo']`

