PHP code example of boatrace / trimmer
1. Go to this page and download the library: Download boatrace/trimmer 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/ */
boatrace / trimmer example snippets
oatrace\Ninja\Trimmer\Trimmer;
var_dump(Trimmer::trim(' 競艇 ')->getValue()); // string(6) "競艇"
var_dump(Trimmer::trim(' 競艇 ', '競')->getValue()); // string(3) "艇"
var_dump(Trimmer::trim(' 競艇 ', '艇')->getValue()); // string(3) "競"
var_dump(Trimmer::trim(' 競艇 ', '競艇')->getValue()); // string(0) ""
var_dump(Trimmer::trim(' @競艇@ ', "\x40")->getValue()); // string(6) "競艇"
var_dump(Trimmer::trim(' @競艇@ ', "\x40")->getValue()); // string(12) "@競艇@"
var_dump(Trimmer::trim(' @競艇 ', "\x40")->getValue()); // string(6) "競艇"
var_dump(Trimmer::trim(' @競艇 ', "\x40")->getValue()); // string(9) "@競艇"
var_dump(Trimmer::trim(' 競艇@ ', "\x40")->getValue()); // string(6) "競艇"
var_dump(Trimmer::trim(' 競艇@ ', "\x40")->getValue()); // string(9) "競艇@"
var_dump(Trimmer::trim(null)->getValue()); // NULL
var_dump(Trimmer::ltrim(' 競艇 ')->getValue()); // string(7) "競艇 "
var_dump(Trimmer::ltrim(' 競艇 ', '競')->getValue()); // string(4) "艇 "
var_dump(Trimmer::ltrim(' 競艇 ', '艇')->getValue()); // string(7) "競艇 "
var_dump(Trimmer::ltrim(' 競艇 ', '競艇')->getValue()); // string(0) ""
var_dump(Trimmer::ltrim(' @競艇@ ', "\x40")->getValue()); // string(8) "競艇@ "
var_dump(Trimmer::ltrim(' @競艇@ ', "\x40")->getValue()); // string(13) "@競艇@ "
var_dump(Trimmer::ltrim(' @競艇 ', "\x40")->getValue()); // string(7) "競艇 "
var_dump(Trimmer::ltrim(' @競艇 ', "\x40")->getValue()); // string(10) "@競艇 "
var_dump(Trimmer::ltrim(' 競艇@ ', "\x40")->getValue()); // string(8) "競艇@ "
var_dump(Trimmer::ltrim(' 競艇@ ', "\x40")->getValue()); // string(10) "競艇@ "
var_dump(Trimmer::ltrim(null)->getValue()); // NULL
var_dump(Trimmer::rtrim(' 競艇 ')->getValue()); // string(7) " 競艇"
var_dump(Trimmer::rtrim(' 競艇 ', '競')->getValue()); // string(7) " 競艇"
var_dump(Trimmer::rtrim(' 競艇 ', '艇')->getValue()); // string(4) " 競"
var_dump(Trimmer::rtrim(' 競艇 ', '競艇')->getValue()); // string(0) ""
var_dump(Trimmer::rtrim(' @競艇@ ', "\x40")->getValue()); // string(8) " @競艇"
var_dump(Trimmer::rtrim(' @競艇@ ', "\x40")->getValue()); // string(13) " @競艇@"
var_dump(Trimmer::rtrim(' @競艇 ', "\x40")->getValue()); // string(8) " @競艇"
var_dump(Trimmer::rtrim(' @競艇 ', "\x40")->getValue()); // string(10) " @競艇"
var_dump(Trimmer::rtrim(' 競艇@ ', "\x40")->getValue()); // string(7) " 競艇"
var_dump(Trimmer::rtrim(' 競艇@ ', "\x40")->getValue()); // string(10) " 競艇@"
var_dump(Trimmer::rtrim(null)->getValue()); // NULL