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
Requires
- yiisoft/yii2: *
Requires (Dev)
- phpunit/phpunit: ^5.7
- symfony/var-dumper: *
This package is not auto-updated.
Last update: 2024-11-15 03:29:56 UTC
README
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