diff options
| author | Leonetienne <leonetienne@hotmail.de> | 2022-03-13 15:52:53 +0100 |
|---|---|---|
| committer | Leonetienne <leonetienne@hotmail.de> | 2022-03-13 15:52:53 +0100 |
| commit | 25bd26972945f956ad4c92ce8a61bb6126c0dedb (patch) | |
| tree | 9548e39ced9cd541586a8dd5c12638a0edb6a1ca /Src/StringTools.h | |
| parent | 5f791b8d9f66b53e1019abfe6a13b6e86fe5ca51 (diff) | |
Implementation Split
Diffstat (limited to 'Src/StringTools.h')
| -rw-r--r-- | Src/StringTools.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/Src/StringTools.h b/Src/StringTools.h index 0c08805..d65772a 100644 --- a/Src/StringTools.h +++ b/Src/StringTools.h @@ -2,32 +2,36 @@ #define STRINGTOOLS_STRINGTOOLS_H
#include <string>
+#include <vector>
/* 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 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 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 char 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 make a string all-lowercase.
- static std::string Lower(const std::string& str);
+ //! 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-uppercase.
- static std::string Upper(const std::string& str);
+ //! Will make a string all-lowercase.
+ static std::string Lower(const std::string& str);
+
+ //! Will make a string all-uppercase.
+ static std::string Upper(const std::string& str);
+
+ //! Will split a string by a string seperator
+ static std::vector<std::string> Split(const std::string& str, const std::string& seperator);
private:
- // No instanciation! >:(
- StringTools();
+ // No instanciation! >:(
+ StringTools();
};
#endif //STRINGTOOLS_STRINGTOOLS_H
|
