MCPcopy Create free account
hub / github.com/araddon/qlbridge / hasSuffixEval

Function hasSuffixEval

expr/builtins/string.go:368–374  ·  view source on GitHub ↗
(ctx expr.EvalContext, vals []value.Value)

Source from the content-addressed store, hash-verified

366 return hasSuffixEval, nil
367}
368func hasSuffixEval(ctx expr.EvalContext, vals []value.Value) (value.Value, bool) {
369 suffixStr := vals[1].ToString()
370 if suffixStr == "" {
371 return value.BoolValueFalse, false
372 }
373 return value.NewBoolValue(strings.HasSuffix(vals[0].ToString(), suffixStr)), true
374}

Callers

nothing calls this directly

Calls 2

NewBoolValueFunction · 0.92
ToStringMethod · 0.65

Tested by

no test coverage detected