Skip to content
Snippets Groups Projects

rm some uses of Boost

Merged Wuttke, Joachim requested to merge j.2 into main
1 file
+ 13
4
Compare changes
  • Side-by-side
  • Inline
+ 13
4
@@ -13,13 +13,22 @@
// ************************************************************************************************
#include "Fit/Tool/StringUtil.h"
#include <boost/algorithm/string.hpp>
#include <algorithm>
#include <ranges>
#include <regex>
//! Returns token vector obtained by splitting string at delimiters.
std::vector<std::string> mumufit::stringUtil::split(const std::string& text,
const std::string& delimiter)
{
std::vector<std::string> tokens;
boost::split(tokens, text, boost::is_any_of(delimiter));
return tokens;
std::vector<std::string> result;
size_t pos = 0;
while (pos != std::string::npos) {
size_t next_pos = text.find(delimiter, pos);
result.push_back(text.substr(pos, next_pos - pos));
if (next_pos == std::string::npos)
break;
pos = next_pos + delimiter.length();
}
return result;
}
Loading