# removeWrapIn()

## `Wrapper.prototype.removeWrapIn()`

Returns given [`text`](#text-string) without the [`opening`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-opening) and [`closing`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-closing) chars of the [`Wrapper`](https://wrapper.angular-package.dev/wrapper-draft/wrapper) object.

{% code title="wrapper.class.ts" %}

```typescript
public removeWrapIn(text: string): string {
  return (
    (text = this.replaceClosingIn(text, '')),
    (text = this.replaceOpeningIn(text, '')),
    text
  );
}
```

{% endcode %}

### Parameters

#### `text: string`

The **text** of a [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) type to unwrap from the [`opening`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-opening) and [`closing`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-closing) chars of the [`Wrapper`](https://wrapper.angular-package.dev/wrapper-draft/wrapper) object.

### Returns

The **return value** is the **text** of [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) type unwrapped from the [`opening`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-opening) and [`closing`](https://wrapper.angular-package.dev/wrapper-draft/wrap/accessors/get-closing) chars of the [`Wrapper`](https://wrapper.angular-package.dev/wrapper-draft/wrapper) object.

## Example usage

```typescript
// Example usage.
import { Wrapper } from '@angular-package/wrapper';

const longText = new Wrapper('{{', '}}', 'This is a long text');
const text = `Lorem ipsum and more`;

// Returns Lorem ipsum and more.
longText.removeWrapIn(`${longText.opening}${text}${longText.closing}`);

// Returns }}Lorem ipsum and more{{.
longText.removeWrapIn(`${longText.closing}${text}${longText.opening}`);
```


---

# 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-draft/wrapper/methods/removewrapin.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.
