Search

Dark theme | Light theme

February 1, 2022

DataWeave Delight: Reverse a string value

DataWeave 2.4 introduced the reverse function in the Strings module. With this function we reverse the string value that we pass in as argument. The result is the reversed string.

In the following example we reverse the value DataWeave Delight:

Source

%dw 2.0
import reverse from dw::core::Strings

output text/plain  
---
reverse("DataWeave Delight")

Output

thgileD evaeWataD

Written with DataWeave 2.4.