PHP code example of ikwattro / string-object
1. Go to this page and download the library: Download ikwattro/string-object library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ikwattro / string-object example snippets
$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