cjrasmussen/string

Simple functions for string manipulation and analysis

1.2.5 2023-10-12 12:35 UTC

This package is auto-updated.

Last update: 2024-04-12 13:55:43 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.