This module will generate true random strings of various length and character compositions.
More...
|
static System.Collections.IEnumerator | Generate (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, bool prng=false, bool silent=false, string id="") |
| Generates random strings. More...
|
|
static System.Collections.Generic.List< string > | GeneratePRNG (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, int seed=0) |
| Generates random strings with the C#-standard Pseudo-Random-Number-Generator. More...
|
|
static System.Collections.Generic.List< string > | GenerateInEditor (int length, int number=1, bool digits=true, bool upper=true, bool lower=true, bool unique=false, bool prng=false, string id="") |
| Generates random strings (Editor only). More...
|
|
|
static System.Collections.Generic.List< string > | Result => result.GetRange(0, result.Count) |
| Returns the list of strings from the last generation. More...
|
|
This module will generate true random strings of various length and character compositions.
◆ Generate()
static System.Collections.IEnumerator Crosstales.TrueRandom.Module.ModuleString.Generate |
( |
int |
length, |
|
|
int |
number = 1 , |
|
|
bool |
digits = true , |
|
|
bool |
upper = true , |
|
|
bool |
lower = true , |
|
|
bool |
unique = false , |
|
|
bool |
prng = false , |
|
|
bool |
silent = false , |
|
|
string |
id = "" |
|
) |
| |
|
static |
Generates random strings.
- Parameters
-
length | How long the strings should be (range: 1 - 20) |
number | How many strings you want to generate (range: 1 - 10'000, default: 1, optional) |
digits | Allow digits (0-9) (default: true, optional) |
upper | Allow uppercase letters (default: true, optional) |
lower | Allow lowercase letters (default: true, optional) |
unique | String should be unique (default: false, optional) |
prng | Use Pseudo-Random-Number-Generator (default: false, optional) |
silent | Ignore callbacks (default: false, optional) |
id | id to identify the generated result (optional) |
◆ GenerateInEditor()
static System.Collections.Generic.List<string> Crosstales.TrueRandom.Module.ModuleString.GenerateInEditor |
( |
int |
length, |
|
|
int |
number = 1 , |
|
|
bool |
digits = true , |
|
|
bool |
upper = true , |
|
|
bool |
lower = true , |
|
|
bool |
unique = false , |
|
|
bool |
prng = false , |
|
|
string |
id = "" |
|
) |
| |
|
static |
Generates random strings (Editor only).
- Parameters
-
length | How long the strings should be (range: 1 - 20) |
number | How many strings you want to generate (range: 1 - 10'000, default: 1, optional) |
digits | Allow digits (0-9) (default: true, optional) |
upper | Allow uppercase letters (default: true, optional) |
lower | Allow lowercase letters (default: true, optional) |
unique | String should be unique (default: false, optional) |
prng | Use Pseudo-Random-Number-Generator (default: false, optional) |
id | id to identify the generated result (optional) |
- Returns
- List with the generated strings.
◆ GeneratePRNG()
static System.Collections.Generic.List<string> Crosstales.TrueRandom.Module.ModuleString.GeneratePRNG |
( |
int |
length, |
|
|
int |
number = 1 , |
|
|
bool |
digits = true , |
|
|
bool |
upper = true , |
|
|
bool |
lower = true , |
|
|
bool |
unique = false , |
|
|
int |
seed = 0 |
|
) |
| |
|
static |
Generates random strings with the C#-standard Pseudo-Random-Number-Generator.
- Parameters
-
length | How long the strings should be |
number | How many strings you want to generate (default: 1, optional) |
digits | Allow digits (0-9) (default: true, optional) |
upper | Allow uppercase (A-Z) letters (default: true, optional) |
lower | Allow lowercase (a-z) letters (default: true, optional) |
unique | String should be unique (default: false, optional) |
seed | Seed for the PRNG (default: 0 (=standard), optional) |
- Returns
- List with the generated strings.
◆ Result
System.Collections.Generic.List<string> Crosstales.TrueRandom.Module.ModuleString.Result => result.GetRange(0, result.Count) |
|
static |
Returns the list of strings from the last generation.
- Returns
- List of strings from the last generation.
◆ OnGenerateFinished
GenerateStringFinished Crosstales.TrueRandom.Module.ModuleString.OnGenerateFinished |
|
static |
Event to get a message with the generated strings when finished.
◆ OnGenerateStart
GenerateStringStart Crosstales.TrueRandom.Module.ModuleString.OnGenerateStart |
|
static |
Event to get a message when generating strings has started.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/TrueRandom/TrueRandomPro/Assets/Plugins/crosstales/TrueRandom/Scripts/Module/ModuleString.cs