MCPcopy Create free account
hub / github.com/LAStools/LAStools / HasValueInt

Method HasValueInt

src/wktparser.cpp:244–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244bool WktParser::HasValueInt(const std::string& key, int& val) {
245 std::string res;
246 if (HasValueStr(key, res)) {
247 size_t pos = res.find('|');
248 try {
249 if (pos != std::string::npos) {
250 val = std::stoi(res.substr(pos + 1, 999));
251 } else {
252 val = std::stoi(res);
253 }
254 return true;
255 } catch (const std::exception&) {
256 return false;
257 }
258 } else {
259 return false;
260 }
261}
262
263bool WktParser::HasValueDouble(const std::string& key, double& val) {
264 std::string res;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected