# `ExDatalog.Constraints.StringPredicate`
[🔗](https://github.com/thanos/ex_datalog/blob/v0.5.0/lib/ex_datalog/constraints/string.ex#L1)

String predicate constraint implementation for the Constraint behaviour.

Evaluates string constraints (`:starts_with`, `:contains`) which filter
bindings based on string relationships. Both operands must be bound and
resolve to binaries (strings). Returns `:filter` if either operand is
unbound or not a binary.

# `evaluate`

```elixir
@spec evaluate(
  ExDatalog.IR.Constraint.t(),
  ExDatalog.Engine.Binding.t(),
  ExDatalog.Constraint.Context.t()
) :: {:ok, ExDatalog.Engine.Binding.t()} | :filter
```

Evaluates a string predicate constraint against a binding environment.

Accepts an `IR.Constraint` struct as produced by the compiler. Returns
`{:ok, binding}` (unchanged) when the predicate passes, or `:filter`
when it fails or an input variable is unbound or not a binary.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
