pub fn substring(
s: &str,
start: i64,
length: Option<i64>,
) -> Result<JValue, FunctionError>Expand description
$substring(str, start, length) - Extract substring Extracts a substring from a string using Unicode character positions. Follows the JSONata spec (which mirrors JS Array.prototype.slice):
- start: zero-based position; negative means count from end
- length: optional max number of characters to extract