> For the complete documentation index, see [llms.txt](https://wrapper.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wrapper.angular-package.dev/wrapper/methods/instance.md).

# Instance

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="/pages/d21qDnBfyU77dU1rfFqm"><strong>isClosingIn()</strong></a><br>Determines whether the provided <a href="/pages/d21qDnBfyU77dU1rfFqm#text-string"><code>text</code></a> has the <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the specified <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object at the <strong>end</strong>.</p>                                                                                                                                                                                                                                                                                                                                                        |
| <p><a href="/pages/IBwPUqKOAFDqfubAkCGH"><strong>isOpeningIn()</strong></a><br>Checks whether the provided <a href="/pages/IBwPUqKOAFDqfubAkCGH#text-string"><code>text</code></a> has the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> chars of a specified <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object at the <strong>beginning</strong>.</p>                                                                                                                                                                                                                                                                                                                                                        |
| <p><a href="/pages/9YbldIwnBrRHuqRn3Ekr"><strong>replaceClosingIn()</strong></a><br>Replaces the <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the <a href="/pages/O5zJvtCr0bk2EDs7sRGG"><code>Wrapper</code></a> object in the given <a href="/pages/9YbldIwnBrRHuqRn3Ekr#text-string"><code>text</code></a> with a given <a href="/pages/9YbldIwnBrRHuqRn3Ekr#replacevalue-string">replacement value</a>.</p>                                                                                                                                                                                                                                                                                                          |
| <p><a href="/pages/r0ktt8Z6NQYoJvssaWgS#replacevalue-string"><strong>replaceOpeningIn()</strong></a><br>Replaces the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object in the given <a href="/pages/r0ktt8Z6NQYoJvssaWgS#text-string"><code>text</code></a> with a given <a href="/pages/r0ktt8Z6NQYoJvssaWgS#replacevalue-string">replacement value</a>.</p>                                                                                                                                                                                                                                                                                      |
| <p><a href="/pages/WVpq8VTHOJozPS19D6NM"><strong>removeWrapIn()</strong></a><br>Returns given <a href="/pages/WVpq8VTHOJozPS19D6NM#text-string"><code>text</code></a> without the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                        |
| <p><a href="/pages/yJLLsLxEoVvdfSws5cFN"><strong>textReplaceClosing()</strong></a><br>Replaces the <a href="/pages/QTYxQh3MKwTJRj5pYA28#wrap.prototype.closing"><code>closing</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object in the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object with the given <a href="/pages/yJLLsLxEoVvdfSws5cFN#closing-string"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                |
| <p><a href="/pages/N7aDbyfgseigOkMY27ej"><strong>textReplaceOpening()</strong></a><br>Replaces the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object in the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object with the given <a href="/pages/N7aDbyfgseigOkMY27ej#opening-string"><code>opening</code></a> chars.</p>                                                                                                                                                                                                                                       |
| <p><a href="/pages/zP95dShqIpnoCQ6qbOps"><strong>textUnwrap()</strong></a><br>The method returns the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object without its <a href="/pages/QTYxQh3MKwTJRj5pYA28#wrap.prototype.opening"><code>opening</code></a> and <a href="/pages/QTYxQh3MKwTJRj5pYA28#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="/pages/RieQNAg5fhTZm6EdBuIf"><strong>textWrap()</strong></a><br>The method returns the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object wrapped by the given <a href="/pages/RieQNAg5fhTZm6EdBuIf#opening-textopening"><code>opening</code></a> and <a href="/pages/RieQNAg5fhTZm6EdBuIf#closing-textclosing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                                              |
| <p><a href="/pages/0bfdKmmJzsCWEBghlZSH"><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="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> chars, <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a>, and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                                                   |
| <p><a href="/pages/DsvHxsxvwveQscLtP0ZI"><strong>toWrap()</strong></a><br>Returns the <a href="/pages/ynTr7YIdKgv6qw68JPND"><code>Wrap</code></a> instance consists of the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a>, <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                                  |
| <p><a href="/pages/J4YBGUI01fGt5Mk2oESt"><strong>unwrap()</strong></a><br>Returns the <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> without the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| <p><a href="/pages/P82XvzmtBw8jttgtZaG3"><strong>unwrapText()</strong></a><br>The method returns the <a href="/pages/K32cdMdrpsCcE0oMk8Ek">primitive value</a> of a specified <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object with <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> unwrapped from the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> instance or given <a href="/pages/P82XvzmtBw8jttgtZaG3#opening-string"><code>opening</code></a> and <a href="/pages/P82XvzmtBw8jttgtZaG3#closing-string"><code>closing</code></a> chars.</p> |
| <p><a href="/pages/bVYiVYIgClIeuiRUmLQi"><strong>★ wrap()</strong></a><br>The method wraps the <a href="/pages/K32cdMdrpsCcE0oMk8Ek">primitive value</a> of a specified <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object by its <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a> and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars, or the given <a href="/pages/bVYiVYIgClIeuiRUmLQi#opening-customopening"><code>opening</code></a> and <a href="/pages/bVYiVYIgClIeuiRUmLQi#closing-customclosing"><code>closing</code></a> chars.</p>                                                                                                                                                |
| <p><a href="/pages/HA4KMgni3JQhmXjFbfIa"><strong>★ wrapOn()</strong></a><br>The method wraps the given <a href="/pages/HA4KMgni3JQhmXjFbfIa#text-customtext"><code>text</code></a> with the wrap, the <a href="/pages/FVgRIdWWBG2tK8BmBSXg"><code>opening</code></a>, and <a href="/pages/y486cVc4dkfJSdWG82YB"><code>closing</code></a> chars of the <a href="/pages/O5zJvtCr0bk2EDs7sRGG"><code>Wrapper</code></a> object.</p>                                                                                                                                                                                                                                                                                                                   |
| <p><a href="/pages/AO2JRfFReB5un4hz9RZ4"><strong>★ wrapText()</strong></a><br>The method returns the <a href="/pages/K32cdMdrpsCcE0oMk8Ek">primitive value</a> of the <a href="/pages/F5qTcvzvEydfKeCd4pxX"><code>Wrapper</code></a> object with <a href="/pages/dVcsuee2Tiyg6m9Naczl"><code>text</code></a> wrapped by given <a href="/pages/AO2JRfFReB5un4hz9RZ4#opening-textopening"><code>opening</code></a> and <a href="/pages/AO2JRfFReB5un4hz9RZ4#closing-textclosing"><code>closing</code></a> chars.</p>                                                                                                                                                                                                                                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
