php-extended / polyfill-str-longest-common-substring
A php implementation of the longest common substring algorithm
1.4.7
2024-12-08 14:11 UTC
Requires
- php: >=8.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-08 13:11:51 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).