# Hex.trimRight

Trims trailing zeros from a [`Hex.Hex`](/api/Hex/types#hex) value.

## Imports

:::code-group
```ts [Named]
import { Hex } from 'ox'
```

```ts [Entrypoint]
import * as Hex from 'ox/Hex'
```
:::

## Examples

```ts twoslash
import { Hex } from 'ox'

Hex.trimRight('0xdeadbeef00000000')
// @log: '0xdeadbeef'
```

## Definition

```ts
function trimRight(
  value: Hex,
): trimRight.ReturnType
```

**Source:** [src/core/Hex.ts](https://github.com/wevm/ox/blob/main/src/core/Hex.ts#L1003)

## Parameters

### value

* **Type:** `Hex`

The [`Hex.Hex`](/api/Hex/types#hex) value to trim.

## Return Type

The trimmed [`Hex.Hex`](/api/Hex/types#hex) value.

`trimRight.ReturnType`
