siteorigin/string-splitter

Splits strings into separate words. Useful for domain names.

1.0.1 2021-11-19 16:24 UTC

This package is auto-updated.

Last update: 2024-10-20 01:55:58 UTC


README

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.