summaryrefslogtreecommitdiff
path: root/src/core/common/Utils.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-23 15:47:59 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-23 15:47:59 +0100
commit18d3637ca02ab69f1ee744fa94c43c243de0f571 (patch)
tree42c859f014ab7dbb7d31a747e0ef3839c77c60fa /src/core/common/Utils.hpp
parent85d72823ef18711fe7a29f5b23cc37b318766332 (diff)
parentaa817d3bfd90aa39b6fd8a915bc78a8bb210cd3d (diff)
Merge branch 'master' of somweyr.de:ousia
Diffstat (limited to 'src/core/common/Utils.hpp')
-rw-r--r--src/core/common/Utils.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/common/Utils.hpp b/src/core/common/Utils.hpp
index 1f7f142..22e0fd3 100644
--- a/src/core/common/Utils.hpp
+++ b/src/core/common/Utils.hpp
@@ -114,6 +114,26 @@ public:
* @return a vector of strings containing the splitted sub-strings.
*/
static std::vector<std::string> split(const std::string &s, char delim);
+
+ /**
+ * Converts the given string to lowercase (only works for ANSI characters).
+ *
+ * @param s is the string that should be converted to lowercase.
+ * @return s in lowercase.
+ */
+ static std::string toLower(std::string s);
+
+ /**
+ * Reads the file extension of the given filename.
+ *
+ * @param filename is the filename from which the extension should be
+ * extracted.
+ * @return the extension, excluding any leading dot. The extension is
+ * defined as the substring after the last dot in the given string, if the
+ * dot is after a slash or backslash. The extension is converted to
+ * lowercase.
+ */
+ static std::string extractFileExtension(const std::string &filename);
};
}