Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyperia-sk/yii2-string-helpers
String helpers for your Yii2 app
https://github.com/hyperia-sk/yii2-string-helpers
helpers string-helper string-manipulation strings yii2 yii2-extension
Last synced: 4 months ago
JSON representation
String helpers for your Yii2 app
- Host: GitHub
- URL: https://github.com/hyperia-sk/yii2-string-helpers
- Owner: hyperia-sk
- License: mit
- Created: 2017-07-07T14:10:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-31T17:34:49.000Z (over 1 year ago)
- Last Synced: 2024-09-29T23:02:10.590Z (4 months ago)
- Topics: helpers, string-helper, string-manipulation, strings, yii2, yii2-extension
- Language: PHP
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Yii2 string helpers
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperia-sk/yii2-string-helpers/master/LICENSE)
> Extension for Yii2 string helpers
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```shell
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
```php
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
```