Description
I encountered some very surprising behaviour using Belt.Int.fromString. If given the string representation of a floating point number, it will silently ignore anything beyond the decimal point.
Looking at the source, it turns out fromString is simply wrapping the Javascript parseInt. This is a very quirky Javascript-esque function, and in my opinion does not deserve a place in Belt.
Examples of surprising behaviour:
"15.9" -> 15 // The ".9" is ignored
"15e99" -> 15 // The "e99" is ignored
" 15" -> 15 // The whitespace is ignored - maybe fine?
I suggest that at least the first two should result in None, since the full string could not be parsed. I find it convenient that leading whitespace is automatically stripped, but some might prefer strict None behaviour in this case as well.
Please - let us not repeat the mistakes of Javascript just because it is convenient to implement.