# Methods

## Static

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="methods/static/define"><strong>define()</strong></a><br>Defines a new <a href=""><code>Wrapper</code></a> instance with the provided <a href="static/define#opening-opening"><code>opening</code></a>, <a href="static/define#closing-closing"><code>closing</code></a> chars, and optional <a href="static/define#text-text"><code>text</code></a>.</p>                                                                                                      |
| <p><a href="methods/static/iswrapper"><strong>isWrapper()</strong></a><br>The method checks if the <a href="static/iswrapper#value-any"><code>value</code></a> of any type is an instance of the <a href=""><code>Wrapper</code></a> of any, or given <a href="static/iswrapper#opening-opening"><code>opening</code></a>, <a href="static/iswrapper#closing-closing"><code>closing</code></a> chars, and <a href="static/iswrapper#text-text"><code>text</code></a>.</p> |
| <p><a href="methods/static/replaceclosing"><strong>replaceClosing()</strong></a><br>Replaces given <a href="static/replaceclosing#closing-string"><code>closing</code></a> chars with a given <a href="static/replaceclosing#replacevalue-string">replacement value</a> at the end of the given <a href="static/replaceclosing#text-string"><code>text</code></a>.</p>                                                                                                    |
| <p><a href="methods/static/replaceopening"><strong>replaceOpening()</strong></a><br>Replaces given <a href="static/replaceopening#opening-string"><code>opening</code></a> chars with a given <a href="static/replaceopening#replacevalue-string">replacement value</a> at the beginning of the given <a href="static/replaceopening#text-string"><code>text</code></a>.</p>                                                                                              |
| <p><a href="methods/static/unwrap"><strong>unwrap()</strong></a><br>The method returns the given <a href="static/unwrap#text-string"><code>text</code></a> without the given <a href="static/unwrap#opening-string"><code>opening</code></a> and <a href="static/unwrap#closing-string"><code>closing</code></a> chars.</p>                                                                                                                                               |

## Instance

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><a href="methods/instance/isclosingin"><strong>isClosingIn()</strong></a><br>Determines whether the provided <a href="instance/isclosingin#text-string"><code>text</code></a> has the <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the specified <a href=""><code>Wrapper</code></a> object at the <strong>end</strong>.</p>                                                                                                                                                                                                                                                                                                                 |
| <p><a href="methods/instance/isopeningin"><strong>isOpeningIn()</strong></a><br>Checks whether the provided <a href="instance/isopeningin#text-string"><code>text</code></a> has the <a href="../wrap/accessors/opening"><code>opening</code></a> chars of a specified <a href=""><code>Wrapper</code></a> object at the <strong>beginning</strong>.</p>                                                                                                                                                                                                                                                                                                                 |
| <p><a href="methods/instance/replaceclosingin"><strong>replaceClosingIn()</strong></a><br>Replaces the <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the <a href="overview"><code>Wrapper</code></a> object in the given <a href="instance/replaceclosingin#text-string"><code>text</code></a> with a given <a href="instance/replaceclosingin#replacevalue-string">replacement value</a>.</p>                                                                                                                                                                                                                                                   |
| <p><a href="instance/replaceopeningin#replacevalue-string"><strong>replaceOpeningIn()</strong></a><br>Replaces the <a href="../wrap/accessors/opening"><code>opening</code></a> chars of the <a href=""><code>Wrapper</code></a> object in the given <a href="instance/replaceopeningin#text-string"><code>text</code></a> with a given <a href="instance/replaceopeningin#replacevalue-string">replacement value</a>.</p>                                                                                                                                                                                                                                               |
| <p><a href="methods/instance/removewrapin"><strong>removeWrapIn()</strong></a><br>Returns given <a href="instance/removewrapin#text-string"><code>text</code></a> without the <a href="../wrap/accessors/opening"><code>opening</code></a> and <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the <a href=""><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                                                 |
| <p><a href="methods/instance/textreplaceclosing"><strong>textReplaceClosing()</strong></a><br>Replaces the <a href="../../wrap/accessors#wrap.prototype.closing"><code>closing</code></a> chars of the <a href=""><code>Wrapper</code></a> object in the <a href="../wrap/accessors/text"><code>text</code></a> of the <a href=""><code>Wrapper</code></a> object with the given <a href="instance/textreplaceclosing#closing-string"><code>closing</code></a> chars.</p>                                                                                                                                                                                                |
| <p><a href="methods/instance/textreplaceopening"><strong>textReplaceOpening()</strong></a><br>Replaces the <a href="../wrap/accessors/opening"><code>opening</code></a> chars of the <a href=""><code>Wrapper</code></a> object in the <a href="../wrap/accessors/text"><code>text</code></a> of the <a href=""><code>Wrapper</code></a> object with the given <a href="instance/textreplaceopening#opening-string"><code>opening</code></a> chars.</p>                                                                                                                                                                                                                  |
| <p><a href="methods/instance/textunwrap"><strong>textUnwrap()</strong></a><br>The method returns the <a href="../wrap/accessors/text"><code>text</code></a> of the <a href=""><code>Wrapper</code></a> object without its <a href="../../wrap/accessors#wrap.prototype.opening"><code>opening</code></a> and <a href="../../wrap/accessors#wrap.prototype.closing"><code>closing</code></a> chars or the given <a href="#opening-string"><code>opening</code></a> and <a href="#closing-string"><code>closing</code></a> chars.</p>                                                                                                                                      |
| <p><a href="methods/instance/textwrap"><strong>textWrap()</strong></a><br>The method returns the <a href="../wrap/accessors/text"><code>text</code></a> of the <a href=""><code>Wrapper</code></a> object wrapped by the given <a href="instance/textwrap#opening-textopening"><code>opening</code></a> and <a href="instance/textwrap#closing-textclosing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                          |
| <p><a href="methods/instance/toarray"><strong>toArray()</strong></a><br>Returns an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>array</code></a> consisting of the <a href="../wrap/accessors/opening"><code>opening</code></a> chars, <a href="../wrap/accessors/text"><code>text</code></a>, and <a href="../wrap/accessors/closing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                     |
| <p><a href="methods/instance/towrap"><strong>toWrap()</strong></a><br>Returns the <a href="../wrap"><code>Wrap</code></a> instance consists of the <a href="../wrap/accessors/text"><code>text</code></a>, <a href="../wrap/accessors/opening"><code>opening</code></a> and <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the <a href=""><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                    |
| <p><a href="methods/instance/unwrap"><strong>unwrap()</strong></a><br>Returns the <a href="../wrap/accessors/text"><code>text</code></a> without the <a href="../wrap/accessors/opening"><code>opening</code></a> and <a href="../wrap/accessors/closing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                                                                                                                            |
| <p><a href="methods/instance/unwraptext"><strong>unwrapText()</strong></a><br>The method returns the <a href="../wrap/methods/instance/valueof">primitive value</a> of a specified <a href=""><code>Wrapper</code></a> object with <a href="../wrap/accessors/text"><code>text</code></a> unwrapped from the <a href="../wrap/accessors/opening"><code>opening</code></a> and <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the <a href=""><code>Wrapper</code></a> instance or given <a href="instance/unwraptext#opening-string"><code>opening</code></a> and <a href="instance/unwraptext#closing-string"><code>closing</code></a> chars.</p> |
| <p><a href="methods/instance/wrap"><strong>★ wrap()</strong></a><br>The method wraps the <a href="../wrap/methods/instance/valueof">primitive value</a> of a specified <a href=""><code>Wrapper</code></a> object by its <a href="../wrap/accessors/opening"><code>opening</code></a> and <a href="../wrap/accessors/closing"><code>closing</code></a> chars, or the given <a href="instance/wrap#opening-customopening"><code>opening</code></a> and <a href="instance/wrap#closing-customclosing"><code>closing</code></a> chars.</p>                                                                                                                                  |
| <p><a href="methods/instance/wrapon"><strong>★ wrapOn()</strong></a><br>The method wraps the given <a href="instance/wrapon#text-customtext"><code>text</code></a> with the wrap, the <a href="../wrap/accessors/opening"><code>opening</code></a>, and <a href="../wrap/accessors/closing"><code>closing</code></a> chars of the <a href="overview"><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                                |
| <p><a href="methods/instance/wraptext"><strong>★ wrapText()</strong></a><br>The method returns the <a href="../wrap/methods/instance/valueof">primitive value</a> of the <a href=""><code>Wrapper</code></a> object with <a href="../wrap/accessors/text"><code>text</code></a> wrapped by given <a href="instance/wraptext#opening-textopening"><code>opening</code></a> and <a href="instance/wraptext#closing-textclosing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wrapper.angular-package.dev/wrapper/methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
