rodion-arr/php-string-helpers

混合一些有用的字符串帮助器的特质

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

This package is auto-updated.

Last update: 2024-09-29 07:58:30 UTC


README

PHP Composer codecov Latest Stable Version License

混合一些有用的字符串帮助器的特质

安装

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