PHP code example of victoryoalli / laravel-string-macros
1. Go to this page and download the library: Download victoryoalli/laravel-string-macros 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/ */
victoryoalli / laravel-string-macros example snippets
$str = Str::of('Hac non ? dolor nisi penatibus maecenas luctus purus rutrum, ? leo sed ut lacinia gravida primis aliquet eget finibus, consequat sapien platea urna vehicula adipiscing est tortor.')->interpolate(['RED','BLUE'])->initials(28)->upper();
echo $str;
// HNRDNPMLPRBLSULGPAEFCSPUVAET
php
Str::interpolate('Roses are ? Violets are ?','RED','BLUE');
// Roses are RED Violets are BLUE
Str::interpolate('Roses are ? Violets are ?',['RED','BLUE']);
// Roses are RED Violets are BLUE
Str::interpolate('Roses are ? Violets are ?',...['RED','BLUE']);
// Roses are RED Violets are BLUE
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.