# String functions

This page describes the additional set of predefined Jsonnet functions for the [Data Transformer Script](https://docs.cloud.google.com/application-integration/docs/configure-data-transformer-script-task.md.txt) task available in Application Integration.

### Before you begin


To use the following predefined functions, you must import the `functions` library in your script. Importing the `functions` library lets you use both the standard Jsonnet functions and the predefined **Data Transformer** functions.


Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see [Jsonnet Standard Library](https://jsonnet.org/ref/stdlib.html).

*** ** * ** ***

### `Equals Ignore Case`

| Syntax | ```html equalsIgnoreCase(str1, str2) ``` |
| Description | Compare the two given string values irrespective of the string case (lower or upper). |
| Input parameter | **str1:** An input string. **str2:** An input string. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the specified value matches the existing value (ignoring case) and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Is Empty`

| Syntax | ```html isEmpty(str) ``` |
| Description | Checks if the length of the given string is 0. |
| Input parameter | **str:** The input string. |
| Return type | `BOOLEAN` |
| Output | Returns **TRUE** if the string is empty and **FALSE** otherwise. |
|---|---|

*** ** * ** ***

### `Match`

| Syntax | ```html match(str, regexp) ``` |
| Description | Retrieves the result of matching a string against a regular expression. |
| Input parameter | **str:** Input string. **regexp:** The [re2 regular expression](https://github.com/google/re2/wiki/Syntax). |
| Return type | `ARRAY` |
| Output | Returns an array of all substrings of `str` that match the regular expression, `regexp`. Returns an empty array if there is no match. |
|---|---|

*** ** * ** ***

### `Trim`

| Syntax | ```html trim(str) ``` |
| Description | Removes all the leading and trailing spaces of a given string. |
| Input parameter | **str:** The input string. |
| Return type | `STRING` |
| Output | Returns a copy of the string, with leading and trailing whitespace removed. |
|---|---|

## Recommendation

- Learn how to add and configure a [Data Transformer Script task](https://docs.cloud.google.com/application-integration/docs/configure-data-transformer-script-task.md.txt)