summaryrefslogtreecommitdiffstats
path: root/Src/StringTools/StringTools.h
diff options
context:
space:
mode:
authorLeonetienne <leonetienne@hotmail.de>2022-02-12 03:07:11 +0100
committerLeonetienne <leonetienne@hotmail.de>2022-02-12 03:07:11 +0100
commita6c9e64eb559a58d31f5ea68b8947f460ed8f04b (patch)
tree0e5789541a3d26e4c0c1bed8a0585be27fc182ec /Src/StringTools/StringTools.h
parentf4e36ec9af5002eaa51c742faa10e4cbc7d66de0 (diff)
Better directory structure naming
Diffstat (limited to 'Src/StringTools/StringTools.h')
-rw-r--r--Src/StringTools/StringTools.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Src/StringTools/StringTools.h b/Src/StringTools/StringTools.h
new file mode 100644
index 0000000..589c047
--- /dev/null
+++ b/Src/StringTools/StringTools.h
@@ -0,0 +1,29 @@
+#pragma once
+#include <string>
+
+/* Handy utensils to manipulate strings */
+class StringTools
+{
+public:
+ //! Will replace every occurence of `find` in `str` by `subst`.
+ static std::string Replace(const std::string& str, const char find, const std::string& subst);
+
+ //! Will replace every occurence of `find` in `str` by `subst`.
+ static std::string Replace(const std::string& str, const std::string& find, const std::string& subst);
+
+ //! Will replace every occurence of `find` in `str` by `subst`.
+ static std::string Replace(const std::string& str, const char find, const char subst);
+
+ //! Will replace every occurence of `find` in `str` by `subst`.
+ static std::string Replace(const std::string& str, const std::string& find, const char subst);
+
+ //! Will make a string all-lowercase. Only works with latin and german umlautes, plus some extras.
+ static std::string Lower(const std::string& str);
+
+ //! Will make a string all-uppercase. Only works with latin and german umlautes, plus some extras.
+ static std::string Upper(const std::string& str);
+
+private:
+ // No instanciation! >:(
+ StringTools();
+};