MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / readFirstNonEmptyLine

Function readFirstNonEmptyLine

Lattice/Engine/io/SimulationStateIO.cpp:42–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 }
41
42 std::string readFirstNonEmptyLine(std::ifstream& file) {
43 std::string line;
44 while (std::getline(file, line)) {
45 const std::string trimmed = trim(line);
46 if (!trimmed.empty()) {
47 return trimmed;
48 }
49 }
50 return {};
51 }
52
53 bool isNewLatFormat(const std::string& firstNonEmptyLine) {
54 return firstNonEmptyLine == "format lat" || firstNonEmptyLine == "[meta]" ||

Callers 1

loadMethod · 0.85

Calls 2

trimFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected