From 638f526eff68c7d2cf450d9fffc9c6123ebc63a2 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 23 Feb 2021 21:19:35 -0500 Subject: [PATCH] substr0 --- go/src/dsl/cst/builtin_function_manager.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/go/src/dsl/cst/builtin_function_manager.go b/go/src/dsl/cst/builtin_function_manager.go index 79ee103a6..718924230 100644 --- a/go/src/dsl/cst/builtin_function_manager.go +++ b/go/src/dsl/cst/builtin_function_manager.go @@ -431,9 +431,23 @@ regex-match operator: try '$y = ~$x'.`, { name: "substr", class: FUNC_CLASS_STRING, - help: `substr(s,m,n) gives substring of s from 1-up position m to n + help: `substr(s,m,n) gives substring of s from 1-up position m to n xxxxxx fix me inclusive. Negative indices -len .. -1 alias to 1 .. len.`, - ternaryFunc: types.MlrvalSubstr, + ternaryFunc: types.MlrvalSubstr0Up, + }, + { + name: "substr0", + class: FUNC_CLASS_STRING, + help: `substr(s,m,n) gives substring of s from 1-up position m to n xxxxxx fix me +inclusive. Negative indices -len .. -1 alias to 1 .. len.`, + ternaryFunc: types.MlrvalSubstr0Up, + }, + { + name: "substr1", + class: FUNC_CLASS_STRING, + help: `substr(s,m,n) gives substring of s from 1-up position m to n xxxxxx fix me +inclusive. Negative indices -len .. -1 alias to 1 .. len.`, + ternaryFunc: types.MlrvalSubstr1Up, }, {