# isClosingIn()

## `Wrapper.prototype.isClosingIn()`

Determines whether the provided [`text`](#text-string) has the [`closing`](https://wrapper.angular-package.dev/wrap/accessors/closing) chars of the specified [`Wrapper`](https://wrapper.angular-package.dev/wrapper) object at the **end**.

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

```typescript
public isClosingIn(text: string): boolean {
  return Wrapper.hasClosing(text, this.closing);
}
```

{% endcode %}

### Parameters

#### `text: string`

The **text** of [`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) to test for the existence of the [`closing`](https://wrapper.angular-package.dev/wrap/accessors/closing) chars at the **end** of it.

### 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`](#text-string) has the [`closing`](https://wrapper.angular-package.dev/wrap/accessors/closing) chars of the wrap.

## 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 true.
longText.isClosingIn(`${text}${longText.closing}`);

// Returns false.
longText.isClosingIn(text);

// Returns false.
longText.isClosingIn(`${longText.closing}${text}`);
```
