added functions for applying leading and trailing whitespace as padding or margin