Mercurial > minori
comparison include/core/strings.h @ 231:69f4768a820c
chore: merge divergent branches
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Sat, 13 Jan 2024 09:43:41 -0500 |
| parents | f784b5b1914c |
| children | 862d0d8619f6 |
comparison
equal
deleted
inserted
replaced
| 230:2f5a9247e501 | 231:69f4768a820c |
|---|---|
| 1 #ifndef __core__strings_h | 1 #ifndef __core__strings_h |
| 2 #define __core__strings_h | 2 #define __core__strings_h |
| 3 | 3 |
| 4 #include <string> | 4 #include <string> |
| 5 #include <vector> | 5 #include <vector> |
| 6 #include <set> | |
| 6 #include <sstream> | 7 #include <sstream> |
| 7 | 8 |
| 8 #include <cstdint> | 9 #include <cstdint> |
| 9 | 10 |
| 10 class QString; | 11 class QString; |
| 14 | 15 |
| 15 /* Implode function: takes a vector of strings and turns it | 16 /* Implode function: takes a vector of strings and turns it |
| 16 * into a string, separated by delimiters. | 17 * into a string, separated by delimiters. |
| 17 */ | 18 */ |
| 18 std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter); | 19 std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter); |
| 20 std::string Implode(const std::set<std::string>& set, const std::string& delimiter); | |
| 19 std::vector<std::string> Split(const std::string &text, const std::string& delimiter); | 21 std::vector<std::string> Split(const std::string &text, const std::string& delimiter); |
| 20 | 22 |
| 21 /* Substring removal functions */ | 23 /* Substring removal functions */ |
| 22 std::string ReplaceAll(std::string string, const std::string& find, const std::string& replace); | 24 std::string ReplaceAll(std::string string, const std::string& find, const std::string& replace); |
| 23 std::string SanitizeLineEndings(const std::string& string); | 25 std::string SanitizeLineEndings(const std::string& string); |
