31
31
#include "validator.h"
33
bool Validator::isNumber(std::string str) {
35
if (!str.empty() && (str[i] == '-' || str[i] == '+'))
37
return string::npos == str.find_first_not_of(".eE0123456789", i);
40
bool Validator::isNotNull(std::string str) {
47
bool Validator::isEqual(std::string str1, std::string str2) {
48
return str1.compare(str2) == 0;
33
bool Validator::isNumber (std::string str)
37
if (!str.empty() && (str[i] == '-' || str[i] == '+'))
40
return string::npos == str.find_first_not_of (".eE0123456789", i);
43
bool Validator::isNotNull (std::string str)
51
bool Validator::isEqual (std::string str1, std::string str2)
53
return str1.compare (str2) == 0;