Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am donovan-digital on github.
  • I am theycallmevirgo (https://keybase.io/theycallmevirgo) on keybase.
  • I have a public key ASDNttYFvyOvGXWP18CD7oCrbh1KCGzPoinu8gtTzrQRsQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am donovan-digital on github.
  • I am theycallmevirgo (https://keybase.io/theycallmevirgo) on keybase.
  • I have a public key ASC-Ex6Ha85Zw22fHLuz4kC2Af05a26Kb9kf9Y5IlIYuago

To claim this, I am signing this object:

@donovan-digital
donovan-digital / isInteger
Created April 22, 2017 22:30
test to see if string is an integer
bool isInteger(const std::string & s) {
if(s.empty() || ((!isdigit(s[0])) && (s[0] != '-') && (s[0] != '+'))) return false ;
char * p ;
strtol(s.c_str(), &p, 10) ;
return (*p == 0) ;
}