What's the fastest way to check if a string is a number?
<p>What's the fastest way to check that a string like "2.4393" or "2" is valid- they can both be represented by a double- whilst the strings "2.343." or "ab.34" are not?  In particular, I want to be able to read any string and, if it <em>can</em> be a double, assign a double variable to it, and if it can't be a double (in the case that it's a word or just invalid input), an error message is displayed.</p>
