# trim

Source: https://taxilang.org/docs/language/stdlib/trim

**Full name:** `taxi.stdlib.trim`

## Signature

```taxi
declare extension function trim(String):String
```

## Description

Removes leading and trailing whitespace from a string.

```taxi
find { order: Order } as {
   cleanRef: String = order.referenceCode.trim()
}
```

## Examples

Strips leading and trailing whitespace from a string.

Query:

```taxi
find {
   trimmed: String = '  hello world  '.trim()
}
```

Result:

```json
{
  "trimmed": "hello world"
}
```
