StringGenerator generator¶
Warning
The current page still doesn't have a translation for this language.
But you can help translating it: Contributing.
Generate strings with configurable length, character set, uniqueness, prefix, and suffix.
Why: Use StringGenerator for bounded synthetic strings with an explicit alphabet and optional affixes; use RegexStringGenerator when the entire lexical shape is best expressed as a regular expression.
Category: core.
Output: str.
1 | |
Parameters¶
min_len:int | null; DefaultNone— Inclusive minimum length of the generated body.max_len:int | null; DefaultNone— Inclusive maximum length of the generated body.char_set:str | null; DefaultNone— Non-empty alphabet sampled for the generated body.unique:bool; DefaultFalse— Whether values must be unique within the supported in-process pool.prefix:str | null; DefaultNone— Constant text prepended to the generated body.suffix:str | null; DefaultNone— Constant text appended to the generated body.