return res;
}
+ std::string readFile(const std::string& file_path)
+ {
+ std::string res;
+ std::ifstream file(file_path.c_str());
+ if (file.is_open())
+ {
+ char ch = file.get();
+ while (!file.eof())
+ {
+ res.push_back(ch);
+ ch = file.get();
+ }
+ file.close();
+ }
+ return res;
+ }
+
+ bool writeFile(const std::string& file_path, const std::string& st)
+ {
+ std::ofstream file(file_path.c_str());
+ if (file.is_open())
+ {
+ file << st;
+ file.close();
+ return true;
+ }
+ return false;
+
+ }
+
CMLFile readCMLFile(const std::string& file_path)
{
CMLFile res;
return false;
}
+
+
+ void
+ normalizeStr(std::string& st)
+ {
+ while(st.size() && isspace(st[0]))
+ st.erase(0,1);
+ while(st.size() && isspace(st[st.size()-1]))
+ st.erase(st.size()-1,1);
+ return;
+ }
+
}