abdellahramadan/string
Composer 安装命令:
composer require abdellahramadan/string
包简介
This is a lightweight string manipulation library for PHP
README 文档
README
This is a simple and lightweight String manipulation library
It is a work in progress and features will be added often
install with composer:
composer require abdellahramadan/string
use AbdellahRamadan\String\Strings;
Slug a text
$text = Strings::slug("this is a simple slug");
echo $text; // this-is-a-simple-slug
Make a text lowercase
$text = Strings::lowercase("I will be MADE A LOWERCASE");
echo $text; // i will be made a lowercase
Search a word
$sentence = "I want to find a word";
Strings::contains($sentence, "find"); // true
Add a prefix
$text = "is a cool language";
echo $completeText = Strings::prefix($text, "PHP"); // PHP is a cool language
And much more...
More string manipulations is being Added
Testing
Test is available in the test folder and can be run with:
vendor/bin/phpunit
Contributing
Contributions are welcome 😃
Licence
MIT Licence
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-03