| 178 |  | return 0; | 
| 179 |  | } | 
| 180 |  |  | 
| 181 | < | std::string OOPSE_itoa(int value, unsigned int base = 10) { | 
| 181 | > | std::string OOPSE_itoa(int value, unsigned int base) { | 
| 182 |  | const char digitMap[] = "0123456789abcdef"; | 
| 183 |  | std::string buf; | 
| 184 |  |  | 
| 217 |  | return str.substr(0, str.find('.')); | 
| 218 |  | } | 
| 219 |  |  | 
| 220 | + | bool isInteger(const std::string& str) { | 
| 221 | + |  | 
| 222 | + | bool result = false; | 
| 223 | + |  | 
| 224 | + | std::string::const_iterator i = str.begin(); | 
| 225 | + | if (i != str.end() && (*i == '+' || *i == '-' || std::isdigit(*i) )) { | 
| 226 | + | ++i; | 
| 227 | + | while (i != str.end() && std::isdigit(*i)) | 
| 228 | + | ++i; | 
| 229 | + | if (i == str.end()) | 
| 230 | + | result = true; | 
| 231 | + | } | 
| 232 | + |  | 
| 233 | + | return result; | 
| 234 |  | } | 
| 235 | + |  | 
| 236 | + | } |