PHP code example of cjrasmussen / string

1. Go to this page and download the library: Download cjrasmussen/string 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/ */

    

cjrasmussen / string example snippets


use cjrasmussen\String\Check;
use cjrasmussen\String\Convert;
use cjrasmussen\String\Parse;

$string = Parse::filterChars('I have 5 apples', Parse::FILTER_NUM);
echo $string; // 5

$json = Check::isJson('This is not JSON');
echo $json; // false

echo Convert::booleanToYesNo(false); // No
echo Convert::booleanToYesNo(true); // Yes