Highlighter
class Highlighter (View source)
Methods
__construct(string $q)
No description
HtmlString
highlight(string $text)
Highlight matching words in the text with <mark>
tags.
string
truncate(string $text, int $chars = 100)
Truncate text surrounding the first match.
Details
__construct(string $q)
No description
HtmlString
highlight(string $text)
Highlight matching words in the text with <mark>
tags.
string
truncate(string $text, int $chars = 100)
Truncate text surrounding the first match.