Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
output application/json
---
{ "trim": trim(" my really long text ") }
You're viewing an older version of the documentation. You can switch to the latest version or use the version selector in the left navigation.
Removes any blank spaces from the beginning and end of a string.
This example trims a string. Notice that it does not remove any spaces from the middle of the string, only the beginning and end.