Template:Trim

Documentation
This template trims whitespace from the beginning and end of the supplied value. It works by using the simple hack of filtering it through the  parser function.

Usage:

fr:Modèle:Trim