> 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/wrap/methods/instance/gettext.md).

# getText()

## `Wrap.prototype.getText()`

Gets the text of the wrap by returning the [`#text`](/wrap/properties/text.md) property of a specified object, without the [opening](/wrap/accessors/opening.md) and [closing](/wrap/accessors/closing.md) chars of the [`Wrap`](/wrap/overview.md).

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

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

{% endcode %}

### Returns

The **return value** is the [`text`](/wrap/accessors/text.md) of a generic type variable [`Text`](https://wrapper.angular-package.dev/wrap/methods/instance/pages/SYPkCWCkQnshiX32nwLt#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();
```
