Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ast/BuiltInFunctions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
package ast

import (
"github.com/hyperjumptech/grule-rule-engine/logger"
"math"
"reflect"
"slices"
"strings"
"time"

"github.com/hyperjumptech/grule-rule-engine/logger"
"github.com/hyperjumptech/grule-rule-engine/pkg"
)

Expand Down Expand Up @@ -537,3 +538,8 @@ func (gf *BuiltInFunctions) Trunc(x float64) float64 {

return math.Trunc(x)
}

// ContainsStr is a wrapper function for slices.Contains function for string
func (gf *BuiltInFunctions) ContainsStr(s []string, v string) bool {
return slices.Contains(s, v)
}
Loading