stack

Home > @infiniteobjects/core-library-web > Random > string

Random.string() method

Produce a random string of size ‘length’

Signature:

static string(length: number, pool?: string): string;

Parameters

Parameter Type Description
length number The size of the resulting string
pool string (Optional) A string containing the possible characters to choose from.

Returns:

string

Remarks

If no ‘pool’ parameter is passed the resulting string will use numbers, uppercase and lowercase letters, _, and -