Crosstales.TrueRandom.Module.ModuleString Class Reference

This module will generate true random strings of various length and character compositions. More...

Inheritance diagram for Crosstales.TrueRandom.Module.ModuleString:
Crosstales.TrueRandom.Module.BaseModule

Static Public Member Functions

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 Public Attributes

static System.Collections.Generic.List< string > Result => result.GetRange(0, result.Count)
 Returns the list of strings from the last generation. More...
 

Events

static GenerateStringStart OnGenerateStart
 Event to get a message when generating strings has started. More...
 
static GenerateStringFinished OnGenerateFinished
 Event to get a message with the generated strings when finished. More...
 
- Events inherited from Crosstales.TrueRandom.Module.BaseModule
static ErrorInfo OnErrorInfo
 Event to get a message when an error occured. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Crosstales.TrueRandom.Module.BaseModule
static void onErrorInfo (string errorInfo, string id)
 
- Static Protected Attributes inherited from Crosstales.TrueRandom.Module.BaseModule
const int timeout = 5
 

Detailed Description

This module will generate true random strings of various length and character compositions.

Member Function Documentation

◆ 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
lengthHow long the strings should be (range: 1 - 20)
numberHow many strings you want to generate (range: 1 - 10'000, default: 1, optional)
digitsAllow digits (0-9) (default: true, optional)
upperAllow uppercase letters (default: true, optional)
lowerAllow lowercase letters (default: true, optional)
uniqueString should be unique (default: false, optional)
prngUse Pseudo-Random-Number-Generator (default: false, optional)
silentIgnore callbacks (default: false, optional)
idid 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
lengthHow long the strings should be (range: 1 - 20)
numberHow many strings you want to generate (range: 1 - 10'000, default: 1, optional)
digitsAllow digits (0-9) (default: true, optional)
upperAllow uppercase letters (default: true, optional)
lowerAllow lowercase letters (default: true, optional)
uniqueString should be unique (default: false, optional)
prngUse Pseudo-Random-Number-Generator (default: false, optional)
idid 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
lengthHow long the strings should be
numberHow many strings you want to generate (default: 1, optional)
digitsAllow digits (0-9) (default: true, optional)
upperAllow uppercase (A-Z) letters (default: true, optional)
lowerAllow lowercase (a-z) letters (default: true, optional)
uniqueString should be unique (default: false, optional)
seedSeed for the PRNG (default: 0 (=standard), optional)
Returns
List with the generated strings.

Member Data Documentation

◆ 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.

Event Documentation

◆ 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