--- title: "Trim" slug: "core-trim-string-resolver" updated: 2026-04-16T12:33:15Z published: 2026-04-16T12:33:15Z canonical: "docs.lobstersoftware.com/core-trim-string-resolver" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Trim *See also:* [Left trim](/v1/docs/en/core-left-trim-resolver), [Right trim](/v1/docs/en/core-right-trim-resolver) > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Removes marginal *whitespace* characters from a string passed as *input value*. > > > [!TIP] > > Tooltip > > > > - **Usage:** The return value provides the string taken as *input value* without any whitespace characters at the edges. > > - **NOTE:** For *input values* that are not *strings*, their *string* mapping is processed. ![images/download/attachments/177910920/image2022-6-28_18-19-20-version-1-modificationdate-1726128685894-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-6-28_18-19-20-version-1-modificationdate-1726128685894-api-v2.png) The [Trim](/v1/docs/en/core-trim-string-resolver) value resolver removes marginal *whitespace* characters from a string passed as *input value*. - If no value (`$null`) is present as *input value*, no value (`$null`) is returned. - For *input values* that are not *strings*, their *string* mapping is processed. ## Configuration The [Trim](/v1/docs/en/core-trim-string-resolver) value resolver expects a string as *input value* and does not use any parameters. ## Example Since [Addresses](/v1/docs/en/base-address) in **Lobster Data Platform/Orchestration** provide three fields for names (`name1`, `name2`, `name3`), it is occasionally necessary to concatenate them to be sure that the full name for an address is rendered. If all fields are always used for an address, their values can simply be strung together with an inserted space. If not all name fields are provided with values for an address, then the concatenated string contains unwanted spaces. Specific case: The `name1` and `name3` fields in a user"s address should identify her as "Karola Mustermann", for whom no middle name is specified. If the standardized salutation for users specifies concatenating `name1`, `name2` and `name3` (using spaces), this user will be addressed as `Karola Mustermann` – with a double space between first and last name. It would be possible to replace double spaces by a single space, but then there would still be problems with users for whose addresses the `name1` or `name3` is not filled. The following configuration catches all (off) cases when populating the name fields without complex case distinctions using the [Trim](/v1/docs/en/core-trim-string-resolver) value resolver. Configuration: | The screenshot shows a configuration for a **Message** (see [Show alert (Popup)](/v1/docs/en/core-popup-actor)), in which all used name components from the address of the logged in user (see [User of session](/v1/docs/en/base-session-user-value)) should appear separated by spaces. In the context of an [Execute with](/v1/docs/en/core-with-actor) event action (not shown in the image), the address stored in the user account is already defined as an *alternative reference object* for the context of the [Concat strings](/v1/docs/en/core-concat-string-resolver) value resolver. Text concatenation is done in stages, each followed by a [Trim](/v1/docs/en/core-trim-string-resolver) value resolver (per concatenation). This ensures that the space inserted within the concatenation as static text is not left "marginalized" if one of the concatenated fields does not contain a value. | ![images/download/attachments/177910920/image-2024-9-12_10-14-16-version-1-modificationdate-1726128855571-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-12_10-14-16-version-1-modificationdate-1726128855571-api-v2.png) | | --- | --- |