(ctx expr.EvalContext, vals []value.Value)
| 343 | return hasPrefixEval, nil |
| 344 | } |
| 345 | func hasPrefixEval(ctx expr.EvalContext, vals []value.Value) (value.Value, bool) { |
| 346 | prefixStr := vals[1].ToString() |
| 347 | if len(prefixStr) == 0 { |
| 348 | return value.BoolValueFalse, false |
| 349 | } |
| 350 | return value.NewBoolValue(strings.HasPrefix(vals[0].ToString(), prefixStr)), true |
| 351 | } |
| 352 | |
| 353 | // HasSuffix string evaluation to see if string ends with |
| 354 | // |
nothing calls this directly
no test coverage detected