Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
import * from dw::core::Strings
output application/json
var text = "hello world!"
---
substring(text, 1, 5)
This version of the product has reached End of Life.
Returns a substring that spans from the character at the
specified from index to the last character before the
until index.
The characters in the substring satisfy the condition
from <= indexOf(string) < until.
Introduced in DataWeave version 2.4.0.