Bỏ qua

NumericStringGenerator generator

Warning

The current page still doesn't have a translation for this language.

But you can help translating it: Contributing.

Generate a numeric string using a deterministic RNG.

Why: Use NumericStringGenerator for fixed- or variable-width digit strings where leading zeroes must be retained; use IntegerGenerator when numeric arithmetic and ordering matter.

Category: core.

Output: str.

1
<key name="value" generator="NumericStringGenerator(length=8, char_set='0123456789')"/>

Parameters

  • length: int | null; Default None — Fixed output length; mutually exclusive with min_len and max_len.
  • min_len: int | null; Default None — Inclusive minimum output length when length is omitted.
  • max_len: int | null; Default None — Inclusive maximum output length when length is omitted.
  • char_set: str | null; Default None — Non-empty characters sampled for each output position.