Converts a number to a string of decimals in base 10.

    >>> to_decimal(123)
    '123'
    >>> to_decimal('o123')
    '83'
    >>> to_decimal('b101010')
    '42'
    >>> to_decimal('0x2a')
    '42'

def to_decimal(number, strip='- '):
    '''
    Converts a number to a string of decimals in base 10.

    >>> to_decimal(123)
    '123'
    >>> to_decimal('o123')
    '83'
    >>> to_decimal('b101010')
    '42'
    >>> to_decimal('0x2a')
    '42'
    '''
    if isinstance(number, six.integer_types):
        return str(number)

    number = str(number)
    number = re.sub(r'[%s]' % re.escape(strip), '', number)

    # hexadecimal
    if number.startswith('0x'):
        return to_decimal(int(number[2:], 16))

    # octal
    elif number.startswith('o'):
        return to_decimal(int(number[1:], 8))

    # binary
    elif number.startswith('b'):
        return to_decimal(int(number[1:], 2))

    else:
        return str(int(number))