Create a string class for consistency
Posted by michaelperrin 4 years ago
To make string functions more consistent (as we all know that the arguments and even the name of the functions themselve are not very straightforward and inherited from PHP 4 times), that would be awesome to have a string class, just like SPLFileInfo, DateTime, classes have been created.
It could be something like this:
You can write some example code:
```php
$a = new SPLString('hello');
$a = $a->concat(' world');
$a = $a->replace('hello', 'hi');
$result = $a->find('world');
```