# String operations

| **Description**                                                                               | **Example**                                                                                                                                              | **Result**               |
| --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| String concatenate                                                                            | {{ concat 'bee' 'hive' }}                                                                                                                                | beehive                  |
| Convert a delimited string into an array                                                      | {{ split 'bee,hive' ',' }}                                                                                                                               | \[]string{“bee”, “hive”} |
| <p>Replace all occurrences of the old value with the new</p><p>value in the target string</p> | <p>{{ replace (Request.Body 'jsonpath' '$.text')</p><p>'be' 'mock' }}</p><p>(where Request.Body has the value of</p><p>{"text":"to be or not to be"}</p> | to mock or not to mock   |
| Return a substring of a string                                                                | {{substring 'thisisalongstring' 7 11}}                                                                                                                   | long                     |
| Return the length of a string                                                                 | {{length 'thisisaverylongstring'}}                                                                                                                       | 21                       |
| Return the rightmost characters of a string                                                   | {{rightmostCharacters 'thisisalongstring' 3}}                                                                                                            | ing                      |
