# wrTruncate

> Clamp string length with optional ellipsis.

Source: https://ngwr.dev/reference/pipes/wr-truncate  
Kind: Pipe

## Import

```angular-ts
import { WrTruncate } from 'ngwr/pipes';

@Component({ imports: [WrTruncate] })
export class MyComponent { /* ... */ }
```

## Basic usage

Strings shorter than the limit pass through untouched.

```angular-html
{{ longText | wrTruncate: 24 }}  <!-- "Lorem ipsum dolor sit a…" -->
```

## Custom ellipsis

Third argument replaces the default `…`.

```angular-html
{{ longText | wrTruncate: 24 : ' [more]' }}
```

## Playground

```html
{{ text | wrTruncate: 24 : '…' }}
```

## API

| Name | Description | Type | Default |
| --- | --- | --- | --- |
| `wrTruncate` | Clamp string length with optional ellipsis. | `(value: string \| null \| undefined, length = 80, ellipsis = '…') => string` | `—` |
