> 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/has-substring.md).

# Has Substring

Checks if a string contains a given substring and returns its index.

**Example:** Has Substring(string: "lorem lorem", substring: ""re") = result: True, index: 2.

### 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/email/text/phone number) - string within which to find a substring.
* \[Input] Substring (string/email/text/phone number) - substring to be found.
* \[Output] Result (boolean) - True if the "String" data input contains at least one instance of the "Substring" data input, False otherwise.
* \[Output] Index (integer) - starting position of the 1st instance of "Substring" data input in "String" data input (starting at 0).
