# ⚠  textHasClosing()

{% hint style="danger" %}
The method does not yet exist.
{% endhint %}

### `Wrapper.prototype.textHasClosing()`

Checks if the provided `text` has the closing of specified [`Wrapper`](https://wrapper.angular-package.dev/wrapper/overview) object at the end of the text.

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

```typescript
public textHasClosing(text: string): boolean {
  return (
    isStringType(text) && text.slice(-this.closing.length) === this.closing
  );
}
```

{% endcode %}

### Parameters

<table><thead><tr><th width="173.44477578337126">Name: type</th><th>Description</th></tr></thead><tbody><tr><td><code>text: string</code></td><td>The text of a <code>string</code> to test against the existence of the <a href="../../../../wrap/accessors#wrap.prototype.closing"><code>closing</code></a> chars.</td></tr></tbody></table>

### Returns

The return value is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the given `text` has the closing of the wrap.

### Example usage

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

// Returns true of boolean.
new Wrapper(`[`, `]`).textHasClosing(`[quote]`);

// Returns false of boolean.
new Wrapper(`{{`, `}}`).textHasClosing(`{{variable`);
```
