cjrasmussen/string

Simple functions for string manipulation and analysis

1.2.6 2024-06-14 04:47 UTC

This package is auto-updated.

Last update: 2024-11-14 05:44:44 UTC


README

Simple functions for string manipulation and analysis.

Usage

use cjrasmussen\String\Strings;

$string = Strings::filterChars('I have 5 apples', Strings::FILTER_NUM);
echo $string; // 5

$json = Strings::isJson('This is not JSON');
echo $json; // false

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.