RandomString class
Random generator for string values.
Example
var value1 = RandomString.pickChar('ABC'); // Possible result: 'C'
var value2 = RandomString.pick(['A','B','C']); // Possible result: 'gBW'
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Methods
-
distort(
String value) → String - Distorts a string by randomly replacing characters in it. [...]
-
nextAlphaChar(
) → String -
Generates random alpha characted
A-Za-z
Returns a random characted. -
nextString(
int minLength int maxLength) → String - Generates a random string, consisting of upper and lower case letters (of the English alphabet), digits (0-9), and symbols ('_,.:-/.[].{},#-!,$=%.+^.&*-() '). [...]
-
pick(
List< String> values) → String - Picks a random string from an array of string. [...]
-
pickChar(
String values) → String - Picks a random character from a string. [...]