summaryrefslogtreecommitdiffhomepage
path: root/stringhelper.h
blob: 7b27a02637f5bb91adc889148cbe5e16ec17c4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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