[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / trimString

# Function: trimString()

> **trimString**(`text`?): `string`

Trims leading and trailing whitespace from a string.

## Parameters

• **text?**: `string`

The string to trim.

## Returns

`string`

The trimmed string, or `null` if the input string is empty or `null`.

## Defined in

[utils/string.util.ts:52](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/utils/string.util.ts#L52)
