xbmc/xbmc — comment on commit d350be8765be8e1eb988654ed5094fa18cc8f740
File:  line 0
By jmarshallnz:

You should be able to use the second param to strtod et. al. to do some validation. Basically an actual number should end up pointing to the null character (end of the string). Anything else should probably be counted as bad, though you might want to consider isspace() as a valid option in the case of " 5691 " being passed in.