Skip to content

siteorigin/string-splitter

Repository files navigation

Splits strings into separate words.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.