Properly space formatted characters by trimming prefix and suffix spaces.