PHP code example of mpclarkson / stringy
1. Go to this page and download the library: Download mpclarkson/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/ */
mpclarkson / stringy example snippets
$stringy = new Stringy("mystring");
$stringy->append("is fun", " ");
echo $stringy->string();
//"mystring is fun";
php
strpos($mystring, $substring) !== false ? true : false;
php
$string = new String($myString);
$bool = $string->contains($substring);