didatus/random-string
Composer 安装命令:
composer require didatus/random-string
包简介
Class for generating random strings with defined parameters
README 文档
README
A simple class for generating random strings.
Create RandomString Instance
use Didatus\RandomString\RandomString; $randomString = new RandomString();
Create RandomString Instance with own character pool and with excluding characters
use Didatus\RandomString\RandomString; $randomString = new RandomString('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1IO0');
Excluding characters can be helpful for generating readable coupons (without confusing 0 and O for example).
Generate a single random string
$randomString = new RandomString(); $string = $randomString->getString(10);
Generate a single random alpha numeric string excluding confusing characters
$randomString = new RandomString('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1IO0'); $string = $randomString->getString(10);
generate a list of five random tokens
$randomString = new RandomString(); $strings = $randomString->getListOfString(10, 5);
C8H5
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-29