> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-platform/2023-2/studio/tasks/reference/trim/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # trim > Use the trim task to remove whitespace from both ends of a string. The `trim` task removes whitespace from both ends of a string — the beginning and the end. ## Potential use case If you want to make sure no spaces have been added at the beginning and end of your dataset in a string entry, use the `trim` task to find and remove them. ## Properties | Incoming | Type | Description | | :------- | :----- | :---------------------------------------------- | | `str` | String | Required. The string to remove whitespace from. | | Outgoing | Type | Description | | :------------- | :----- | :------------------------------------------------------------------------------- | | `noWhitespace` | String | A new string representing the input `str` stripped of whitespace from both ends. | ## Example In this example, a new job variable named "String" is used to input the data into the `trim` task. The value is **Hello World**, with spaces at the beginning and end of the string. ![](/_fern-img/b90d318d1b1929855e7bcdaccba0c24313b2ab2ed651749d28673c4392550049.webp) The `trim` task references the new variable within the reference task. The reference variable is automatically set to accept the incoming `str` value. ![](/_fern-img/f0d2da6f2b1ec1dd7d41a04bee5a787d2e6cdf5f5f5cf24c9d924a498eca42a8.webp) After running the job, the incoming variable shows whitespace before and after **Hello World**, as indicated by the placement of the quotation marks. ![](/_fern-img/19667fa1962aeb1528f25e5ee9247cab00069bfc81e0e892a0ece6f3ebd7c3b3.webp) The `noWhitespace` result returns **"Hello World"** with the whitespace removed from both ends. ![](/_fern-img/6a9a0ff01743b61af99759fcde29ef11dabe6da1bf95bb655c8e39b261a9b683.webp) > Use the trim task to remove whitespace from both ends of a string.