aboutsummaryrefslogtreecommitdiff
path: root/src/util/spanparsing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/spanparsing.cpp')
-rw-r--r--src/util/spanparsing.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/util/spanparsing.cpp b/src/util/spanparsing.cpp
index 50f6aee419..565c867e18 100644
--- a/src/util/spanparsing.cpp
+++ b/src/util/spanparsing.cpp
@@ -6,8 +6,9 @@
#include <span.h>
+#include <algorithm>
+#include <cstddef>
#include <string>
-#include <vector>
namespace spanparsing {
@@ -48,20 +49,4 @@ Span<const char> Expr(Span<const char>& sp)
return ret;
}
-std::vector<Span<const char>> Split(const Span<const char>& sp, char sep)
-{
- std::vector<Span<const char>> ret;
- auto it = sp.begin();
- auto start = it;
- while (it != sp.end()) {
- if (*it == sep) {
- ret.emplace_back(start, it);
- start = it + 1;
- }
- ++it;
- }
- ret.emplace_back(start, it);
- return ret;
-}
-
} // namespace spanparsing