MCPcopy Create free account
hub / github.com/SZAILAB/MaterialDFT-Demo / find_line_exact

Function find_line_exact

cpp_core/src/potcar_parser.cpp:290–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290std::size_t find_line_exact(
291 const std::vector<std::string>& lines,
292 std::size_t start,
293 const std::string& target_lower
294) {
295 for (std::size_t i = start; i < lines.size(); ++i) {
296 if (lower_copy(trim_copy(lines[i])) == target_lower) {
297 return i;
298 }
299 }
300 return lines.size();
301}
302
303std::optional<double> extract_value_by_key(const std::string& line, const std::string& key) {
304 const std::string lower_line = lower_copy(line);

Callers 1

parse_dataset_blockFunction · 0.85

Calls 3

lower_copyFunction · 0.85
sizeMethod · 0.80
trim_copyFunction · 0.70

Tested by

no test coverage detected