Is there a way to check a variable/string if it has characters with anything other than numbers?
Reason I ask, I have an edit text control that only expects numbers and dashes "-" and if you fatfinger, or purposely type characters in the box, itll crash the app as I am dealing with it numerically.
Of course, I strip the "-" out of the variable before processing it as a number.
any ideas? thanks.
Reason I ask, I have an edit text control that only expects numbers and dashes "-" and if you fatfinger, or purposely type characters in the box, itll crash the app as I am dealing with it numerically.
Of course, I strip the "-" out of the variable before processing it as a number.
any ideas? thanks.