1. Go to this page and download the library: Download effectra/to-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/ */
effectra / to-string example snippets
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->toUppercase('Hello, World!');
echo $result; // Output: HELLO, WORLD!
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->toLowercase('Hello, World!');
echo $result; // Output: hello, world!
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->strip('<p>Hello, <b>World!</b></p>');
echo $result; // Output: Hello, World!
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$myVariable = 'Hello, World!';
$result = $textToString->nameVar($myVariable);
echo $result; // Output: myVariable
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->textToSlug('Hello, World!');
echo $result; // Output: hello-world
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->slugToText('hello-world');
echo $result; // Output: Hello World
use Effectra\ToString\TextToString;
$textToString = new TextToString();
$result = $textToString->generateRandomText(8);
echo $result; // Output: C4rN1QX7