Getting started Community Training Tutorials Documentation APIs, AI & Tools
%dw 2.0
import first from dw::core::Strings
output application/json
---
"hello world!" first 5
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.
Returns characters from the beginning of a string to the specified number of characters in the string, for example, the first two characters of a string.
If the number is equal to or greater than the number of characters in the string, the function returns the entire string.
Introduced in DataWeave version 2.4.0.