cjrasmussen / string
Simple functions for string manipulation and analysis
2.0.1
2025-03-19 23:15 UTC
Requires
- php: >=7.4.0
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.6
- roave/security-advisories: dev-latest
README
Simple functions for string manipulation and analysis.
Usage
use cjrasmussen\String\Check; use cjrasmussen\String\Convert; use cjrasmussen\String\Parse; $string = Parse::filterChars('I have 5 apples', Parse::FILTER_NUM); echo $string; // 5 $json = Check::isJson('This is not JSON'); echo $json; // false echo Convert::booleanToYesNo(false); // No echo Convert::booleanToYesNo(true); // Yes
Installation
Simply add a dependency on cjrasmussen/string to your composer.json file if you use Composer to manage the dependencies of your project:
composer require cjrasmussen/string
Although it's recommended to use Composer, you can actually include the file(s) any way you want.
License
String is MIT licensed.