Constructor
new AutoNumbering(startValueopt, numberingTextFormatopt)
- Description:
- Constructs an auto-numbering generator that prefixes a number to each item. This is a convenience wrapper around `SequentialText` for cases where you want numbered outputs like "1. Item A", "2. Item B", etc.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
startValue |
number |
<optional> |
1
|
Starting number for the sequence. |
numberingTextFormat |
string |
<optional> |
"{0}. "
|
Format for the numeric prefix. The string must contain "{0}" as a placeholder. |
Classes
Methods
next(textopt) → {string}
- Description:
- Generates the next string in the sequence by prefixing a number to the given text. This method calls the base `next()` to get the current number and appends the optional string after it.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string |
<optional> |
""
|
Optional content to append after the number. |
Returns:
Numbered string like "1. Hello"
- Type
- string