%dw 2.0
import * from dw::core::Strings
output application/json
---
{
  "a": wrapWith(null, "'"),
  "b": wrapWith("", "'"),
  "c": wrapWith("ab", "x"),
  "d": wrapWith("'ab'", "'"),
  "e": wrapWith("ab", "'")
}
wrapWith
wrapWith(text: String, wrapper: String): String
Wraps the specified text with the given wrapper.
Introduced in DataWeave version 2.2.0.



