(string, cols, padding=' ')
return '\n'.join(stack)
Returns given string with right padding.
Returns given string with right padding.
Returns given string with right padding .
def min_width(string, cols, padding=' '):
    """Returns given string with right 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)
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 )