I have a script that receives a string that contains a number.
The string may be “1000” or “1000.25” or “1111111111111111111111111” or “abc111”
I would like to be able to check firstly if it is a number, and fail if it is not, and also fail if there are fractions.
I am having trouble converting to a suitable number type that still lets me check for the mentioned scenarios.
Basically I need to check that the string only contains an integer number, no matter how large that number may be.
Would really appreciate some help on this one.
Thanks
Dave
This is the function I’ve used to achieve what you want: