bool IsometricGridDot::ParseOption()

in IsometricPatternMatcher/IsometricPattern.cpp [221:231]


bool IsometricGridDot::ParseOption(const std::string& s, const std::string& key,
                                   T& val) {
  size_t pos = s.find(key);
  if (pos == std::string::npos) {
    return false;
  } else {
    std::stringstream ss(s.substr(pos + key.length()));
    ss >> val;
    return true;
  }
}