A trait for mixing-in some useful string helpers
composer require rodion-arr/php-string-helpers
namespace Doorway;
require_once __DIR__.'/vendor/autoload.php'; // Autoload files using Composer
use RodionARR\StringHelpers\StringHelper;
class MyClass
{
use StringHelper;
public function __construct(array $keywords)
{
$this->toUpperCase('some string');
$this->cleanUpString('some string');
$this->addTrailingDot('some string');
$this->sanitizeBladeString('some string');
// more examples in unit test file
}
}