rodion-arr/php-string-helpers

A trait for mixing-in some useful string helpers

v2.0.1 2021-10-04 08:53 UTC

This package is auto-updated.

Last update: 2024-12-29 08:28:57 UTC


README

PHP Composer codecov Latest Stable Version License

A trait for mixing-in some useful string helpers

Installation

composer require rodion-arr/php-string-helpers

Usage

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
    }
}