Add trim spaces function.