30 #ifndef CORE_UTILS_FILEUTIL_H
31 #define CORE_UTILS_FILEUTIL_H
43 std::ifstream input(filename.c_str());
46 while (std::getline(input, line))
48 auto index = line.find(str);
49 if (index != std::string::npos && line.find(
'\0') > index)
66 for (
auto it = line.begin(); it != line.end(); it++)
69 if ( (c ==
'\t') || (c ==
',') || (c ==
'"') )
76 if ( line.empty() )
return false;
78 if ( (line[0] ==
'#') || (line[0] ==
'%') )
return true;
void replaceDelimitersWithWhitespace(std::string &line)
Definition: FileUtil.h:56
bool fileContainsString(const std::string &filename, const std::string &str)
Definition: FileUtil.h:41
bool lineStartsWithComment(const std::string &line)
Definition: FileUtil.h:74