def convert_to_int(s) -> int:
    """
    Converts a string to int

    Args:
        s (str): a string containg numbers and periods 

    Returns:
        int: 
    """
    allowed_chars = "0123456789."
    num = s.strip()
    try:
        temp = int(num)
        return temp
    except:
        res = "".join([i for i in num if i in allowed_chars])
        return int(float(res)) if res != "" else 0