SkillAgentSearch skills...

Randstring

Random String Generator

Install / Use

/learn @jamosaur/Randstring
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

randstring

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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.

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated8y ago
Forks0

Languages

PHP

Security Score

70/100

Audited on Jun 7, 2017

No findings