code: def min_width(string, cols, padding=' '):
      
  
      is_color = isinstance(string, ColoredString)
  
      stack = tsplit(str(string), NEWLINES)
  
      for i, substring in enumerate(stack):
          _sub = clean(substring).ljust((cols + 0), padding)
          if is_color:
              _sub = (_sub.replace(clean(substring), substring))
          stack[i] = _sub
          
      return '\n'.join(stack)
docs: Returns given string with right padding.