# query.private.Predicate.matches_text

- **Module:** query.private.Predicate
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/query/private.rs#L177
- **Page:** https://libtmux.org/en/rs/latest/reference/query-private-predicate-matches_text/

```
query.private.Predicate.matches_text(self, candidate: &[u8]) -> bool
```

Match a strict UTF-8 candidate with this text predicate.

Invalid UTF-8 returns `false` before every operator, including
exclusion from an empty set.

The [`crate::query::Filterable`] example executes this method in a
hand-written generated-code expansion.
