blob: 1c618eef6b8d2008ea61436c309f6d80cf9c6ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef STR_HH
#define STR_HH
#include <string_view>
#include <vector>
namespace str {
void split(std::string_view str, std::vector<std::string_view>& out,
char separator = ' ', bool keep_empty = false);
[[nodiscard]] std::vector<std::string_view> split(std::string_view str,
char separator = ' ',
bool keep_empty = false);
void split(std::string_view str, std::vector<std::string_view>& out,
std::string_view separator, bool keep_empty = false);
[[nodiscard]] std::vector<std::string_view> split(std::string_view str,
std::string_view separator,
bool keep_empty = false);
[[nodiscard]]
std::string_view trim(std::string_view str);
} // namespace str
#endif // STR_HH
|