I have a number that comes as a string from an input. It could be "450.021"
or "30"
. I need to determine whether it is int
or a float
number. How do I do that?
I tried with intval
but apparently floating numbers are floored and in my case it is not going to help me.