-
Notifications
You must be signed in to change notification settings - Fork 0
searchStr
Corey Avis edited this page Sep 23, 2026
·
2 revisions
A manual formatting helper that applies the necessary wildcards to a search term.
searchStr(string $str, string $op = '%'): string
str (string) : The string to format.
op (string)
: The search operator. (default: '%') ^(optional)^
| Operator | Description |
|---|---|
| % | Search ('%search%') |
| =% | Starts with ('search%') |
| %= | Ends with ('%search') |
(string) : Returns the formatted search string.
$db->searchStr('term') = %term%
$db->searchStr('term', '=%') = term%
$db->searchStr('term', '%=') = %term
- No debug errors.