PHP code example of wernerdweight / stringy
1. Go to this page and download the library: Download wernerdweight/stringy 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/ */
wernerdweight / stringy example snippets
use WernerDweight\Stringy\Stringy;
$stringy = new Stringy('This is a string');
echo $string
->toLowercase() // this is a string
->replace(' ', '-') // this-is-a-string
->convertCase(Stringy::KEBAB, Stringy::PASCAL) // ThisIsAString
->reverse(); // gnirtSAsIsihT