We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e90fe commit 08c80bfCopy full SHA for 08c80bf
ast/BuiltInFunctions.go
@@ -15,12 +15,13 @@
15
package ast
16
17
import (
18
- "github.com/hyperjumptech/grule-rule-engine/logger"
19
"math"
20
"reflect"
+ "slices"
21
"strings"
22
"time"
23
24
+ "github.com/hyperjumptech/grule-rule-engine/logger"
25
"github.com/hyperjumptech/grule-rule-engine/pkg"
26
)
27
@@ -537,3 +538,8 @@ func (gf *BuiltInFunctions) Trunc(x float64) float64 {
537
538
539
return math.Trunc(x)
540
}
541
+
542
+// ContainsStr is a wrapper function for slices.Contains function for string
543
+func (gf *BuiltInFunctions) ContainsStr(s []string, v string) bool {
544
+ return slices.Contains(s, v)
545
+}
0 commit comments