# Set String

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/string-functions/set-string
>
> SetString replaces or inserts the part of a delimited string at a given rank, using a separator, with a new value.

This Function returns a string with Value replacing a Source String according to a Rank and a Separator.

### Parameters

* **Source string** <_string_> - String from where to replace the substring.
* **Rank** <_numeric_> - Order of the substring to replace.
* **Separator** <_string_> - String used as a separator in the Source string, to divide it.
* **Value** <_string_> - String to use for insert or replace.

### Examples

* _Example 1_

SetString("001;Kalipso Studio;5000;Software", 2, ";","Sysdev")\
**Result** = 001;Sysdev;5000;Software

* _Example 2_

SetString("001;Kalipso Studio;5000;Software", 1, ":","Sysdev")\
**Result** = Sysdev

* _Example 3_

SetString("001;Kalipso Studio;5000;Software", 2, ":","Sysdev")\
**Result** = "001;Kalipso Studio;5000;Software:Sysdev"

:::info
If the Rank is higher than the number of parts, the result will be the source string concatenated with the missing separators and the Value.
:::

:::info
If the Separator doesn’t exist and the specified Rank is 1, the result will be the Value
:::
