# SplitCommandText(string)

Method in [DialogueRunner](https://docs.yarnspinner.dev/2.2/api/csharp/yarn.unity/yarn.unity.dialoguerunner)

## Summary

Splits input into a number of non-empty sub-strings, separated by whitespace, and grouping double-quoted strings into a single sub-string.

```csharp
public static IEnumerable<string> SplitCommandText(string input)
```

## Remarks

This method behaves similarly to the `string.Split(char[], StringSplitOptions)` method with the `StringSplitOptions` parameter set to `StringSplitOptions.RemoveEmptyEntries` , with the following differences:

* Text that appears inside a pair of double-quote characters will not be split.
* Text that appears after a double-quote character and before the end of the input will not be split (that is, an unterminated double-quoted string will be treated as though it had been terminated at the end of the input.)
* When inside a pair of double-quote characters, the string `\\` will be converted to `\`, and the string `\"` will be converted to `"`.

## Parameters

| Name           | Description          |
| -------------- | -------------------- |
| `string` input | The string to split. |

## Returns

A collection of sub-strings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/2.2/api/csharp/yarn.unity/yarn.unity.dialoguerunner/yarn.unity.dialoguerunner.splitcommandtext.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
