template_chunk
Classes:
| Name | Description |
|---|---|
TemplateChunk |
Class to hold a chunk of a Template. |
Classes#
TemplateChunk #
Class to hold a chunk of a Template.
A chunk is a smaller part of a template. E.g., the template "{a}{b}{c}d" has 4 chunks: "{a}", "{b}", "{c}", and "d".
Methods:
| Name | Description |
|---|---|
sub |
|
Attributes:
| Name | Type | Description |
|---|---|---|
is_required |
|
|
parts |
|
|
regex |
|
|
str |
|
|
var_name |
|
Source code in tsdat/tstring/template_chunk.py
Attributes#
Functions#
sub #
sub(
value: str | Callable[[], str] | None,
allow_missing: bool = False,
fill: str | None = None,
) -> str