Template:Trim

Taken from Wikipedia

Syntax:

= text with any leading or trailing whitespace removed.