hyperia/yii2-string-helpers

String helpers for your Yii2 app

Installs: 8 279

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 1

Type:yii2-extension

1.0.4 2020-11-04 20:25 UTC

README

GitHub license

Extension for Yii2 string helpers

Installation

The preferred way to install this extension is through composer.

Either run

composer require hyperia/yii2-string-helpers:"^1.0"

or add

"hyperia/yii2-string-helpers": "^1.0"

to the require section of your composer.json.

Available Methods

  • contains
  • isLonger
  • isShorter
  • length
  • toLower
  • toUpper
  • firstCharToUpper
  • removeAccent

Usage

use hyperia\helpers\StringHelper;

echo StringHelper::isLonger('This is test string', 12); // 1
echo StrinhHelper::removeAccent('Ħí ŧħə®ë, юßť å test!'); // Hi there, jusst a test!
echo StringHelper::contains('is', 'This is test string'); // 1

Tests

./vendor/bin/phpunit