siteorigin / string-splitter
Splits strings into separate words. Useful for domain names.
1.0.1
2021-11-19 16:24 UTC
Requires
- php: ^8.0
- illuminate/collections: ^8.68
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9
- spatie/ray: ^1.28
- vimeo/psalm: ^4.8
This package is auto-updated.
Last update: 2024-10-20 01:55:58 UTC
README
A very simple library for splitting strings into separate words. It uses English word frequency data to guess the most likely combinations. The algorithm is fairly slow, so this is best suited to splitting short strings like domain names.
Installation
You can install the package via composer:
composer require siteorigin/string-splitter
Usage
$splitter = new SiteOrigin\StringSplitter\StringSplitter('expertsexchange'); var_dump($splitter->split()); // ['experts', 'exchange']
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.