Class TextGenerator
- Namespace
- Hegel
- Assembly
- Hegel.dll
Draws strings: any Unicode text by default, narrowed by size, code point, category or alphabet.
public sealed class TextGenerator : ValueGenerator<string>
- Inheritance
-
TextGenerator
- Inherited Members
Properties
Label
The span label the engine files this generator's draws under. Defaults to a label derived from the class's full name.
public override ulong Label { get; }
Property Value
Methods
Alphabet(string)
Only the characters of chars. Cannot be combined with the other restrictions.
public TextGenerator Alphabet(string chars)
Parameters
charsstring
Returns
Categories(params string[])
Only the Unicode general categories categories ("L", "Nd", ...).
public TextGenerator Categories(params string[] categories)
Parameters
categoriesstring[]
Returns
Codec(string)
Only text that codec ("ascii", "utf-8", ...) can encode.
public TextGenerator Codec(string codec)
Parameters
codecstring
Returns
Codepoints(int, int)
Only code points in [min, max].
public TextGenerator Codepoints(int min, int max)
Parameters
Returns
DoDraw(TestCase)
Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.
protected override string DoDraw(TestCase tc)
Parameters
tcTestCase
Returns
ExcludeCategories(params string[])
None of the Unicode general categories categories.
public TextGenerator ExcludeCategories(params string[] categories)
Parameters
categoriesstring[]
Returns
ExcludeCharacters(string)
Never the characters of chars.
public TextGenerator ExcludeCharacters(string chars)
Parameters
charsstring
Returns
IncludeCharacters(string)
Also the characters of chars, whatever the other restrictions say.
public TextGenerator IncludeCharacters(string chars)
Parameters
charsstring
Returns
MaxSize(int)
At most maxSize code points.
public TextGenerator MaxSize(int maxSize)
Parameters
maxSizeint
Returns
MinSize(int)
At least minSize code points.
public TextGenerator MinSize(int minSize)
Parameters
minSizeint