futape / string-utility
A library of string utilities
1.2.0
2019-12-30 14:11 UTC
Requires
- php: ~7.2.0
- ext-mbstring: *
- futape/array-utility: ^2.0.0
Requires (Dev)
- phpunit/phpunit: ^8.4
This package is auto-updated.
Last update: 2025-03-29 00:37:11 UTC
README
This library offers a set of string utilities.
Utility functions are implemented as static functions in an abstract class, which is never expected to be instantiated.
Most functions are implemented multibyte-safe. If not, this is mentioned in the source code.
Install
composer require futape/string-utility
Usage
use Futape\Utility\String\Strings; echo Strings::stripLeft('foobar', 'foo'); // "bar"
Testing
The library is tested by unit tests using PHP Unit.
To execute the tests, install the composer dependencies (including the dev-dependencies), switch into the tests
directory and run the following command:
../vendor/bin/phpunit