> For the complete documentation index, see [llms.txt](https://levno-710.gitbook.io/prometheus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://levno-710.gitbook.io/prometheus/steps/splitstrings.md).

# SplitStrings

{% hint style="info" %}
**Legacy mirror:** Prometheus documentation has moved to [**https://prometheus-lua.github.io/Prometheus/docs/**](https://prometheus-lua.github.io/Prometheus/docs/).\
This GitBook remains online for existing links/search results and may not always reflect the latest changes.
{% endhint %}

### Settings

| Name                      | type   | description                                                                                                                                                                            | Values                      |
| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| Treshold                  | number | The relative amount of nodes that will be affected                                                                                                                                     | 0 <= x <= 1                 |
| MinLength                 | number | The minimal length for the chunks in that the Strings are splitted                                                                                                                     | x > 0                       |
| MaxLength                 | number | The maximal length for the chunks in that the Strings are splitted                                                                                                                     | x >= MinLength              |
| ConcatenationType         | enum   | The Functions used for Concatenation. Note that when using custom, the String Array will also be Shuffled                                                                              | "strcat", "table", "custom" |
| CustomFunctionType        | enum   | <p>The Type of Function code injection This Option only applies when custom Concatenation is selected.<br>Note that when chosing inline, the code size may increase significantly!</p> | "global", "local", "inline" |
| CustomLocalFunctionsCount | number | The number of local functions per scope. This option only applies when CustomFunctionType = local                                                                                      | x > 0                       |

### Example

{% code title="in.lua" %}

```lua
print("Hello, World!")
```

{% endcode %}

{% code title="out.lua" %}

```lua
-- MinLength = 1
-- MaxLength = 1
local f = function(f)
    local k, C = f[#f], ""
    for j = 1, #k, 1 do
        C = C .. k[f[j]]
    end
    return C
end
print(f({13, 11, 4, 12, 1, 6, 8, 10, 9, 7, 3, 2, 5, {"o", "d", "l", "l", "!", ",", "r", " ", "o", "W", "e", "l", "H"}}))
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://levno-710.gitbook.io/prometheus/steps/splitstrings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
