15 # pragma warning (disable: 4996)
23 std::string& key, std::string& value,
25 key.clear(); value.clear();
26 string::size_type n = line.find(
'#');
27 string linea = trim(line.substr(0, n));
28 if (linea.empty())
return false;
29 n = delim ? linea.find(delim) : linea.find_first_of(
" \t\n\v\f\r");
30 key = trim(linea.substr(0, n));
31 if (key.empty())
return false;
32 if (n != string::npos) value = trim(linea.substr(n + 1));
37 std::string& key, std::string& value) {
38 return ParseLine(line, key, value,
'\0');
42 #if GEOGRAPHICLIB_PRECISION == 5
44 char* digitenv = getenv(
"GEOGRAPHICLIB_DIGITS");
46 ndigits = strtol(digitenv, NULL, 0);
Header for GeographicLib::Utility class.
static int set_digits(int ndigits)
static bool ParseLine(const std::string &line, std::string &key, std::string &value, char delim)
static int set_digits(int ndigits=0)
Namespace for GeographicLib.