15 # pragma warning (disable: 4996) 23 std::string&
key, std::string& val) {
24 const char* spaces =
" \t\n\v\f\r";
25 string::size_type n0 = line.find_first_not_of(spaces);
26 if (n0 == string::npos)
28 string::size_type
n1 = line.find_first_of(
'#', n0);
31 val = line.substr(n0, n1 == string::npos ? n1 : n1 - n0);
32 n0 = val.find_first_of(spaces);
33 key = val.substr(0, n0);
34 if (n0 == string::npos) {
38 n0 = val.find_first_not_of(spaces, n0);
39 if (n0 == string::npos) {
43 n1 = val.find_last_not_of(spaces);
44 val = val.substr(n0, n1 + 1 - n0);
49 #if GEOGRAPHICLIB_PRECISION == 5 51 char* digitenv = getenv(
"GEOGRAPHICLIB_DIGITS");
53 ndigits = strtol(digitenv,
NULL, 0);
static int set_digits(int ndigits)
Header for GeographicLib::Utility class.
Namespace for GeographicLib.
static int set_digits(int ndigits=0)
static bool ParseLine(const std::string &line, std::string &key, std::string &val)