24 if ( s[0] ==
'0' && ( s[1] ==
'x' || s[1] ==
'X' ) )
33 else if ( isspace( ch ) )
46 if ( ch ==
'-' || ch ==
'+' || ( ch >=
'0' && ch <=
'9' ) || ch ==
'.' )
61 const char* s = str.c_str();
62 int ch =
static_cast<unsigned char>( s[0] );
63 if ( isdigit( ch ) || ch ==
'.' || ch ==
'+' || ch ==
'-' )
65 char *endptr = NULL, *endptr2 = NULL;
66 int l = strtol( s, &endptr, radix );
67 double d = strtod( s, &endptr2 );
69 if ( endptr >= endptr2 )
74 if ( ( l != INT_MIN ) && ( l != INT_MAX ) )
78 if ( !isspace( *endptr ) )
80 if ( *endptr ==
'/' && *( endptr + 1 ) ==
'/' )
92 return new BLong( l );
100 if ( ( d != -HUGE_VAL ) && ( d != +HUGE_VAL ) )
104 if ( !isspace( *endptr2 ) )
106 if ( *endptr2 ==
'/' && *( endptr2 + 1 ) ==
'/' )
137 if ( filename.find(
".ecl" ) == std::string::npos )
138 return filename +
".ecl";
bool could_be_a_number(const char *s)
BObjectImp * bobject_from_string(const std::string &str, int radix)
BObjectImp * convert_numeric(const std::string &str, int radix)
std::string normalize_ecl_filename(const std::string &filename)