Extension for Yii2 string helpers
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.
- contains
- isLonger
- isShorter
- length
- toLower
- toUpper
- firstCharToUpper
- removeAccent
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
./vendor/bin/phpunit