# XWUITruncatedFormat

Shortens a long string to a maximum length and exposes the full text as a native `title` tooltip on overflow (Blueprint TruncatedFormat equivalent). Use it in tables, lists, or chips where space is tight but the complete value must stay accessible. Choose where the ellipsis lands with `truncate` (`start` / `middle` / `end`), cap the length with `maxLength`, and disable the hover tooltip with `showTooltip: false`. Call `setText()` to re-truncate new content.

## Usage

```ts
import { XWUITruncatedFormat } from './XWUITruncatedFormat';

const cell = new XWUITruncatedFormat(
  container,
  { text: '/very/long/path/to/some/deeply/nested/file.txt' },
  { truncate: 'middle', maxLength: 32, showTooltip: true }
);

cell.setText('/another/long/path/here.txt');
```

## Basic Usage

A long sentence shortened at the end with an ellipsis, exposing the full text as a hover tooltip.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A long sentence shortened at the end with an ellipsis, exposing the full text as a hover tooltip.
```

## File Paths

Truncates several long file paths in the middle so the leading directory and the filename both stay visible.

```example
file: examples/FilePaths.ts
html: examples/FilePaths.html
title: File Paths
description: Truncates several long file paths in the middle so the leading directory and the filename both stay visible.
```

## Truncation Modes

Renders the same long URL three times with start, middle, and end truncation to compare where the ellipsis lands.

```example
file: examples/TruncationModes.ts
html: examples/TruncationModes.html
title: Truncation Modes
description: Renders the same long URL three times with start, middle, and end truncation to compare where the ellipsis lands.
```

```api
```
