comparison include/utils.hpp @ 1014:026f6b3b122c

Moving pull request2
author Wendlasida
date Fri, 01 Jun 2018 17:32:52 -0400
parents 6c5ce3ec497e
children
comparison
equal deleted inserted replaced
1013:d6f121ded971 1014:026f6b3b122c
15 std::vector<std::vector<float> > loadNumbers(const std::string& filename, const std::string& separator = ::separator); 15 std::vector<std::vector<float> > loadNumbers(const std::string& filename, const std::string& separator = ::separator);
16 16
17 /** Gets line in a file, skipping comments (starting with '#') (wrapper around getline). 17 /** Gets line in a file, skipping comments (starting with '#') (wrapper around getline).
18 * Warning: returns an empty string if all the lines to the end of the file are comments. */ 18 * Warning: returns an empty string if all the lines to the end of the file are comments. */
19 std::string getlineComment(std::ifstream& f); 19 std::string getlineComment(std::ifstream& f);
20
21 /** Get relative filename if not absolute */
22 std::string getRelativeFilename(const std::string& parentDirname, const std::string& filename);
20 23
21 /** Converts a string to an integer. */ 24 /** Converts a string to an integer. */
22 int toInt(const std::string& s); 25 int toInt(const std::string& s);
23 26
24 /** Converts a string to a float. */ 27 /** Converts a string to a float. */