---
name: "BIS_fnc_splitString"
type: function
status: ok
groups: ["Strings"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_splitString
revid: 323143
updated: 2022-06-30T17:01:12Z
---

# BIS_fnc_splitString

*Function · Strings · Arma 3 v1.00*

## Description

Splits given string according to given separator(s).

> [!NOTE]
> **Arma 3:** See [splitString](../commands/splitString.md).

## Syntax

```sqf
[stringToSplit, separators, byWord] call BIS_fnc_splitString
```

**Parameters:**

- `stringToSplit`: [String](../topics/String.md)
- `separators`: [String](../topics/String.md) - (Optional, default "") by default each letter is a separator. If *byWord* is set to [true](../commands/true.md), the separator will be treated as whole word
- `byWord`: [Boolean](../topics/Boolean.md) - (Optional, default [false](../commands/false.md)) by default uses [splitString](../commands/splitString.md) behaviour e.g. each letter is a separator. If set to [true](../commands/true.md), the separator will be treated as whole word

**Returns:** [Array](../topics/Array.md) of [String](../topics/String.md)s

## Examples

### Example 1

```sqf
["this is a test", " "] call BIS_fnc_splitString; // returns ["this", "is", "a", "test"]
```

### Example 2

```sqf
["this is a test", "st"] call BIS_fnc_splitString; // returns ["hi"," i"," a ","e"]
```

### Example 3

```sqf
["this is a test", "is"] call BIS_fnc_splitString; // returns ["th"," "," a te","t"]
```

### Example 4

```sqf
["this is a test", "is", true] call BIS_fnc_splitString; // returns ["th"," "," a test"]
```

## See also

[splitString](../commands/splitString.md) · [toArray](../commands/toArray.md) · [toString](../commands/toString.md)

<sub>Source: [BI Community Wiki — BIS fnc splitString](https://community.bistudio.com/wiki/BIS_fnc_splitString) (revision 323143).</sub>
