# Middle

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/string-functions/middle
>
> Mid returns a substring of a given length from a starting position in a string, for use in Kalipso expressions.

This Function returns a _\<string>_, which is a substring of the specified **Source string**, starting at the **Starting position**, with the specified Length.

### Parameters

* **Source string** _\<string> -_ String from where to extract a substring.
* **Starting position** _\<string> -_ Starting position in the **Source string** of the string to extract.
* **Length** _\<numeric> -_ Length of the substring to extract.

### Examples

* _Example 1_

Mid("Enjoy Kalipso.", 7, 7)\
**Result** = Kalipso

* _Example 2_

Mid("Enjoy Kalipso.", 0, 5)\
**Result** = Enjoy

* _Example 3_

Mid("Enjoy Kalipso.", 15, 2)\
**Result** =

* _Example 4_

Mid("Enjoy Kalipso.", 7, 10)\
**Result** = Kalipso.

:::info
If you specify a **Starting position** higher than the length of the specified **Source string**, and empty string will be returned.
:::

:::info
If you specify a Length higher than the difference between the length of the specified **Source string** and the specified **Starting position**, the returned string will be the left part of the **Source string**, starting at **Starting position**.
:::
