Download the PHP package writecrow/highlighter without Composer
On this page you can find all versions of the php package writecrow/highlighter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download writecrow/highlighter
More information about writecrow/highlighter
Files in writecrow/highlighter
Download writecrow/highlighter
More information about writecrow/highlighter
Files in writecrow/highlighter
Vendor writecrow
Package highlighter
Short Description Highlights words/phrases per specified parameters
License MIT
Package highlighter
Short Description Highlights words/phrases per specified parameters
License MIT
Please rate this library. Is it a good library?
Informations about the package highlighter
Excerpt Highlighter
A PHP library for creating a highlighted excerpt a provided list of tokens in a provided text string.
Basic usage in an application
The included index.php
file contains a generation form demo.
Make your code aware of the Highlighter class via your favorite method
(e.g., use writecrow\Highlighter\HighlightExcerpt;
)
Advanced behaviors
The excerpt highlighter will:
- Default to case-insensitive highlighting for a word (e.g.,
'the'
) - Become case-sensitive if the token is wrapped in double quotes (e.g.
'"The"'
) - Not highlight partial word matched (e.g.,
'the'
will not highlighttherefore
) - Given multiple tokens passed to be highlighted, will create shorter, concatenated excerpts from the text which overall try to honor the length parameter specified (see below)
- Produce excerpts that start/end on word boundaries
Length
Pass a 3rd parameter, an integer, to the function to specify the desired length of the excerpt.
All versions of highlighter with dependencies
PHP Build Version
Package Version
No informations.
The package writecrow/highlighter contains the following files
Loading the files please wait ....