def _get_magnitude(string):
    """
    Get the magnitude of the smallest significant value in the string

    :param str string: A representation of the value as a string
    :returns: The magnitude of the value in the string. e.g. for 102, the magnitude is 0, and for 102.03 it is -2
    :rtype: int
    """
    split_by_period = string.split(".")
    if len(split_by_period) == 2:
        return -1 * len(split_by_period[-1])
    elif len(split_by_period) == 1:
        return len(string) - len(string.rstrip('0'))
    else:
        raise ValueError(string + " does not contain a value")