@staticmethod
def _get_decimal_places(c):
    """returns the the number of decimal places in the string"""
    try:
        s = str(c)
        return len(s) - s.index('.') - 1
    except ValueError:
        return 0
