★ wrapOn()
Wrapper.prototype.wrapOn()
Wrapper.prototype.wrapOn()
The method wraps the given text
with the wrap, the opening
, and closing
chars of the Wrapper
object.
wrapper.class.ts
Generic type variables
CustomText
extends
string
=
''
CustomText
extends
string
=
''
A generic type variable constrained by the string
indicates the captured type of the supplied text
parameter and the value of the generic type variable Text
in the generic type Wrapped
via return type, by default an empty string
.
Parameters
The text of generic type variable CustomText
to wrap by the opening
and closing
chars of the Wrapper
instance.
Return type
Wrapped<Opening, CustomText, Closing>
Wrapped<Opening, CustomText, Closing>
The return type is generic type Wrapped
that takes generic type variables Opening
, CustomText
and Closing
.
Returns
The return value is the given text
wrapped by the opening
and closing
chars of the Wrapper
object of the generic type Wrapped
.
Example usage
Last updated