diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-05 10:37:41 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-05 10:37:41 +0100 |
commit | 0f2ac0c4311e4429bfa4ede1d96ce467b5dceb5b (patch) | |
tree | b4dbe07617ca818b182a18f27d0d4e6bafc91841 /stringhelper.h | |
parent | 0c0d858e4f9423fb9697bad9a012cb67fcee75e0 (diff) |
Added tests
Diffstat (limited to 'stringhelper.h')
-rw-r--r-- | stringhelper.h | 17 |
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 |