ikwattro/string-object

String manipulation with objects

1.1.0 2016-12-23 21:15 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:25:49 UTC


README

PHP String manipulation with objects.

Get it :

composer require ikwattro/string-object

Example :

$code = StringObject::newInstance("Toys - Bicycles and Bikes - 12398")
    ->split("-")
    ->last()
    ->trim();`

# 12398
$formatted = StringObject::newInstance("Christmas is on 25/12")
    ->toLower()
    ->replace("/","-");

# christmas is on 25-12

Licence

MIT