Instance methods
Tag.prototype.
Public
Tag.prototype.getClosingTag()
Tag.prototype.getClosingTag()
Gets the closing tag of a specified Tag
object.
Returns
The return value is the closing tag of a generic type ClosingTag
.
Tag.prototype.getName()
Tag.prototype.getName()
Gets the tag name without the opening and closing char.
Returns
The return value is the tag name of a generic type variable Name
.
Tag.prototype.getOpeningTag()
Tag.prototype.getOpeningTag()
Gets the opening tag of the specified Tag
object.
Returns
The return value is the opening tag of a generic type OpeningTag
.
Tag.prototype.getWrap()
Tag.prototype.getWrap()
Gets the wrap of a tag name.
Returns
The return value is an instance of Wrap
.
Tag.prototype.replaceTag()
Tag.prototype.replaceTag()
The method replaces the tag of a specified Tag
object with the provided replaceValue
in the given text
if both values are strings.
Need to know: The return type of a generic type variable Text
returns the text with not replaced tags.
Generic Type variables
Name / Description |
---|
A generic type variable constrained by the |
Parameters
Name: type | Description |
---|---|
| The text in which to replace a tag of a specified object with a given |
| The value to replace a tag of a specified object in the given |
Returns
The return value is the given text
of a generic type variable Text
with a replaced tag if both the text
and replaceValue
are strings. If replaceValue
is not a string
returns not replaced text
, and if both the text
and replaceValue
are not strings returns an empty string
.
Tag.prototype.tagText()
Tag.prototype.tagText()
The method tags the provided text
with the opening and closing tag.
Generic type variables
Name / Description |
---|
Parameters
Name: type | Description |
---|---|
| The text of a |
Returns
The return value is a new Tagged
instance with a tagged text
.
Example usage
Tag.prototype.valueOf()
Tag.prototype.valueOf()
Returns tag name, a primitive value of the specified Tag
object.
Returns
The return value is a tag name of a generic type variable Name
.
Last updated