adding an utils struct

This commit is contained in:
Clément Le Bihan
2021-06-17 00:21:19 +02:00
parent d8cd2875a2
commit 5b1f9d18e6
5 changed files with 100 additions and 1 deletions
+15
View File
@@ -441,4 +441,19 @@ namespace BBM {
}
return strings;
}
std::string ParserYAML::getHeader(const std::string &line)
{
std::stringstream ss(line);
std::string headerName;
std::string garbage;
ss >> headerName >> garbage;
if (!garbage.empty()) {
throw ParserError("error on getHeader line: ");
}
return headerName;
}
}