Center-pads a string to the given column width using spaces.

def _pad_string(self, str, colwidth):
        """Center-pads a string to the given column width using spaces."""
        width = self._disp_width(str)
        prefix = (colwidth - 1 - width) // 2
        suffix = colwidth - prefix - width
        return ' ' * prefix + str + ' ' * suffix