# string.trimWhiteSpace()

clean white space of the given string

```
string.trimWhiteSpace( )
```

**Returns:** string

*This function does not take any arguments.*

# 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=res.trimWhitespace().len(), label="string length");
```

# Categories

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

# See Also

[TrimWhitespace()](../../functions/trimwhitespace.md), [String](../string.md)