From 0f2ac0c4311e4429bfa4ede1d96ce467b5dceb5b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 5 Jan 2023 10:37:41 +0100 Subject: Added tests --- stringhelper.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 stringhelper.h (limited to 'stringhelper.h') 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 +#include + +#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 split(std::string value, const std::string separators = "\r\n "); +EXPORT std::string join(std::vector vs, std::string separator = "\n"); +EXPORT bool startsWithAnyOfLower(const std::string &s, const std::vector &list); + +} // namespace -- cgit v1.2.3