Class: SliceParser
Parser for the slice tag.
This tag will take a string and return a substring of it.
Aliases: slice, substr, substring
Example
{slice(3): Hello World}
{slice(3, 7): Hello World}
{slice(3-7): Hello World}Hierarchy
- 
↳
SliceParser 
Implements
Constructors
constructor
• new SliceParser()
Overrides
Properties
acceptedNames
• Protected acceptedNames: string[]
Inherited from
requiredParameter
• Protected requiredParameter: boolean
Inherited from
requiredPayload
• Protected requiredPayload: boolean
Inherited from
Methods
parse
▸ parse(ctx): string
Parses the given tag.
Parameters
| Name | Type | Description | 
|---|---|---|
ctx | Context | The context of the tag. | 
Returns
string
Implementation of
willAccept
▸ willAccept(ctx): boolean
Whether the parser can handle the given tag.
Parameters
| Name | Type | Description | 
|---|---|---|
ctx | Context | The context of the tag. | 
Returns
boolean