def _find_int(a_str, offset):
    """Find an int within a_str.

    :return: The int and the offset of the first character after the int.
    """
    if offset == len(a_str):
        return 0, offset
    initial_offset = offset
    while offset < len(a_str):
        offset += 1
        try:
            int(a_str[initial_offset:offset])
        except ValueError:
            offset -= 1
            break
    return int(a_str[initial_offset:offset]), offset
