Overview
Wrapper {}
The Wrapper is an extension of the Wrap object, which means it represents the immutable wrap of the opening and closing with the additional main ability to use it to wrap strings.
Instance
Accessors
[Symbol.toStringTag]
The get accessor toStringTag of the Symbol changes the default tag String of the instance to the custom tag Wrapper.
Methods
isClosingIn()
Determines whether the provided text has the closing chars of the specified Wrapper object at the end.
isOpeningIn()
Checks whether the provided text has the opening chars of a specified Wrapper object at the beginning.
replaceClosingIn()
Replaces the closing chars of the Wrapper object in the given text with a given replacement value.
replaceOpeningIn()
Replaces the opening chars of the Wrapper object in the given text with a given replacement value.
removeWrapIn()
Returns given text without the opening and closing chars of the Wrapper object.
textWrap()
The method returns the text of the Wrapper object wrapped by the given opening and closing chars.
unwrapText()
The method returns the primitive value of a specified Wrapper object with text unwrapped from the opening and closing chars of the Wrapper instance or given opening and closing chars.
★ wrapOn()
The method wraps the given text with the wrap, the opening, and closing chars of the Wrapper object.
★ wrapText()
The method returns the primitive value of the Wrapper object with text wrapped by given opening and closing chars.
Static
Methods
replaceClosing()
Replaces given closing chars with a given replacement value at the end of the given text.
replaceOpening()
Replaces given opening chars with a given replacement value at the beginning of the given text.
Last updated
Was this helpful?
