PHP code example of deha-soft / jp-string-helper
1. Go to this page and download the library: Download deha-soft/jp-string-helper 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/ */
deha-soft / jp-string-helper example snippets
'providers' => [
// ...
DehaSoft\JpStringHelper\JpStrRulesServiceProvider::class,
];
# or using rule alias
public function rules()
{
return [
'name' => ['full_size'],
'description' => ['half_size'],
];
}
php
# using Transform import
use DehaSoft\JpStringHelper\Transform;
$fullSizeStr = "12345ザヂプabcd";
$output = Transform::toHalfSize($fullSizeStr);
echo $output;
>>> 12345ザヂプabcd
$halfSizeStr = "12345ザヂプabcd";
$output = Transform::toFullSize($halfSizeStr);
echo $output;
>>> 12345ザヂプabcd