Parse 97 or 97.0 to Integer: clever method?

If you are sure that you can discard the digits after the decimal point (because they are always zeros), you can use split() before parse():

julia> s = "20.0"; parse(Int, split(s, ".")[1])
20

julia> s = "20"; parse(Int, split(s, ".")[1])
20