%dw 2.0
import * from dw::core::Strings
output application/json
---
"42 = 11 * 2 + 20" countCharactersBy isNumeric($)
countCharactersBy
countCharactersBy(text: String, predicate: (character: String) -> Boolean): Number
Counts the number of times an expression that iterates through
each character in a string returns true
.
Introduced in DataWeave version 2.4.0.