summaryrefslogtreecommitdiff
path: root/src/str.hh
blob: 58d5d3258aaf8eb406540fd964d4b92875be409f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#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);

}  // namespace str

#endif  // STR_HH