# convert-text-to-list

## Description

<mark style="color:purple;">`convert-text-to-list`</mark> *adaptor converts text into a list using the specified separator to denote the points at which each split should occur.*

The default separator used for each split is the `\` (newline) character, this can be changed by setting the `separator` input. The number of values to be included in the output list can be limited by setting the `limit` input.

## Inputs

**`text`**\
Type: `text`\
Required: Yes\
The text to be converted.

**`separator`**\
Type: `text`\
Required: No\
The separator text, or regular expression, which denotes the points at which each split should occur. The separator is treated as a regular expression if it begins and ends with `/`. If unspecified, defaults to (newline).

**`limit`**\
Type: `number`\
Required: No\
A positive integer specifying a limit on the number of splits to be found. If unspecified, defaults to `null` (no limit).

## Outputs

**`list`**\
Type: `list`\
A list of texts split at each point where the separator occurs in the input text, or an empty list if no occurrences found.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`text`:

```
Spring
Summer
Autumn
Winter
```

#### Outputs:

`list`:

* Spring
* Summer
* Autumn
* Winter

-> Converted text to list.

### Example 2: Convert text with comma separator.

#### Inputs:

`text`:

```
Spring,Summer,Autumn,Winter
```

`separator`: `,` (comma)

#### Outputs:

`list`:

* Spring
* Summer
* Autumn
* Winter

-> Converted text with comma separator to a list.


---

# 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://cgps.gitbook.io/data-flo/reference-guide/convert-text-to-list.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.
