> For the complete documentation index, see [llms.txt](https://appmaster.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appmaster.gitbook.io/docs/business-logic/block/functions/string/slice-string.md).

# Slice String

Slices a string into a substring of a given length.

**Example:** Slice String(string: "lorem ipsum", start: 2, length: 3) = "rem".

### Flow Connections <a href="#flow-connections" id="flow-connections"></a>

* \[Input] In - starts the block's execution.
* \[Output] Out - activates when the block has finished its execution.

### Data Connections <a href="#data-connections" id="data-connections"></a>

* \[Input] String (string) - string to be sliced.
* \[Input] Start (integer) - beginning index of the substring, starting at 0. If set to -1, the required characters will be taken from the end of the string. For example, Slice String(string: "lorem", start: -1, length: 2) = "em".
* \[Input] Length (integer) - length of the substring. If set to -1, all characters until the end of string will be returned. For exmaple, Slice String(string: "lorem", start: 2, length: -1) = "rem".
* \[Output] Result (string) - result of the operation.
