# TrimWhitespace()

clean white space of the given string

```
TrimWhitespace( input=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| input | string | Yes | string to clean up. |  |

# Examples

```cfml
	res = "   I love Lucee     ";

	writeDump(var=res, label="Original string");

	writeOutput("Before Trim the Whitespace <br />");
	writeDump(var=res.len(), label="string length");

	writeOutput("After Trim the Whitespace <br />");
	writeDump(var=TrimWhitespace(res).len(), label="string length");
```







# Categories

[Strings](../../categories/string.md)

# See Also

[LTrim()](ltrim.md), [RTrim()](rtrim.md), [Trim()](trim.md), [string.trimWhiteSpace()](../objects/string/trimwhitespace.md)