summaryrefslogtreecommitdiffhomepage
path: root/stringhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'stringhelper.h')
-rw-r--r--stringhelper.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/stringhelper.h b/stringhelper.h
new file mode 100644
index 0000000..7b27a02
--- /dev/null
+++ b/stringhelper.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <string>
+#include <vector>
+
+#define EXPORT __attribute__((visibility("default")))
+
+namespace Reichwein::Stringhelper {
+
+[[deprecated("Better use libfmt or std::format[C++20]")]]
+EXPORT std::string strfmt(const char* fmt, ...);
+
+EXPORT std::vector<std::string> split(std::string value, const std::string separators = "\r\n ");
+EXPORT std::string join(std::vector<std::string> vs, std::string separator = "\n");
+EXPORT bool startsWithAnyOfLower(const std::string &s, const std::vector<std::string> &list);
+
+} // namespace