def extract_prefix_int_from_str(a_str):
    """Gets an int from the string, taking only the char before a non digit char"""
    ret_str = ""
    for a_char in a_str:
        if a_char.isdigit():
            ret_str += a_char
        else:
            return ret_str
    return ret_str