PHP code example of aviator / length-aware-string
1. Go to this page and download the library: Download aviator/length-aware-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/ */
aviator / length-aware-string example snippets
$las = LengthAwareString::make('string', 5);
$las = LengthAwareString::make('string', 5, new YourStrategy);
$las->get();
// 'string'
echo $las;
// 'string'
echo count($las);
// 6