Template
Defined in: packages/pythonlib/src/string.ts:50
Constructors
Constructor
new Template(
template:string):Template
Defined in: packages/pythonlib/src/string.ts:53
Parameters
| Parameter | Type |
|---|---|
template | string |
Returns
Template
Properties
template
readonlytemplate:string
Defined in: packages/pythonlib/src/string.ts:51
Methods
getIdentifiers()
getIdentifiers():
string[]
Defined in: packages/pythonlib/src/string.ts:90
Get identifiers in template
Returns
string[]
safeSubstitute()
safeSubstitute(
mapping?:Record<string,unknown>):string
Defined in: packages/pythonlib/src/string.ts:74
Perform substitution, returning original placeholder for missing keys
Parameters
| Parameter | Type |
|---|---|
mapping? | Record<string, unknown> |
Returns
string
substitute()
substitute(
mapping?:Record<string,unknown>):string
Defined in: packages/pythonlib/src/string.ts:58
Perform substitution, raising KeyError for missing keys
Parameters
| Parameter | Type |
|---|---|
mapping? | Record<string, unknown> |
Returns
string