php-extended / polyfill-str-longest-common-substring
A php implementation of the longest common substring algorithm
1.4.6
2024-07-31 13:28 UTC
Requires
- php: >=8.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-31 00:23:21 UTC
README
A php implementation of the longest common substring algorithm.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/polyfill-str-longest-common-substring": "^1"
Basic Usage
This library gives the function strLongestCommonSubstring(?string $str1, ?string $str2) : string
:
$lcs = \strLongestCommonSubstring('foobarbaz', 'quxfoobar');
// $lcs is 'foobar'
License
MIT (See license file).