jamosaur/randstring
Composer 安装命令:
composer require jamosaur/randstring
包简介
Random string generator
README 文档
README
Random string generator make from colours, animals and numbers.
All code is PSR-2 friendly
Install
Via Composer
$ composer require jamosaur/randstring
Usage
// Generate a random string. $rand = new Jamosaur\Randstring\Randstring(); echo $rand->generate(); // buoyantwhitetippedreefshark56 // Generate a sentence case string that is no greater than 15 characters long. $rand = new Jamosaur\Randstring\Randstring('sentence', 15); echo $rand->generate(); // BumpySquirrel32 // Generate a string with the first letter in uppercase that is no greater than 20 characters long. $rand = new Jamosaur\Randstring\Randstring('ucfirst', 20); echo $rand->generate(); // Moistmountaincat75 // Generate a string with the first letter in uppercase that is no longer than 35 characters long with a random // number between 123 and 143. $rand = new Jamosaur\Randstring\Randstring('ucfirst', 35, 123, 143); echo $rand->generate(); // Tangibleindianrockpython127 // Generate a string formatted in camelCase $rand = new Jamosaur\Randstring\Randstring('camel'); echo $rand->generate(); // carefulZebra23
Change log
Please see CHANGELOG for more information what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 557
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-11