12 namespace GeographicLib {
17 std::string& key, std::string& val) {
18 const char* spaces =
" \t\n\v\f\r";
19 string::size_type n0 = line.find_first_not_of(spaces);
20 if (n0 == string::npos)
22 string::size_type n1 = line.find_first_of(
'#', n0);
25 val = line.substr(n0, n1 == string::npos ? n1 : n1 - n0);
26 n0 = val.find_first_of(spaces);
27 key = val.substr(0, n0);
28 if (n0 == string::npos) {
32 n0 = val.find_first_not_of(spaces, n0);
33 if (n0 == string::npos) {
37 n1 = val.find_last_not_of(spaces);
38 val = val.substr(n0, n1 + 1 - n0);
Header for GeographicLib::Utility class.
static bool ParseLine(const std::string &line, std::string &key, std::string &val)