# getText()

## `Wrap.prototype.getText()`

Gets the text of the wrap by returning the [`#text`](https://docs.angular-package.dev/wrapper/wrap/properties/text) property of a specified object, without the [opening](https://docs.angular-package.dev/wrapper/wrap/accessors/opening) and [closing](https://docs.angular-package.dev/wrapper/wrap/accessors/closing) chars of the [`Wrap`](https://docs.angular-package.dev/wrapper/wrap).

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

```typescript
public getText(): Text {
  return this.#text;
}
```

{% endcode %}

### Returns

The **return value** is the [`text`](https://docs.angular-package.dev/wrapper/wrap/accessors/text) of a generic type variable [`Text`](https://docs.angular-package.dev/wrapper/generic-type-variables#wrap-less-than...-text-...greater-than).

## Example usage

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

// Returns quote of type "quote".
new Wrap(`[`, `]`, 'quote').getText();
```
