Added trim support

Fixes #2. I would have replaced SprintfValueFormatter instead, but that would result in BC issues.