File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 44
55#include < util/string.h>
66
7- #include < boost/algorithm/string/replace.hpp>
8-
7+ #include < regex>
98#include < string>
9+ #include < utility>
1010
11- void ReplaceAll (std::string& in_out, std::string_view search, std::string_view substitute)
11+ void ReplaceAll (std::string& in_out, const std::string& search, const std::string& substitute)
1212{
13- boost::replace_all (in_out, search, substitute);
13+ if (search.empty ()) return ;
14+ in_out = std::regex_replace (in_out, std::regex (std::move (search)), substitute);
1415}
Original file line number Diff line number Diff line change 1717#include < string_view>
1818#include < vector>
1919
20- void ReplaceAll (std::string& in_out, std::string_view search, std::string_view substitute);
20+ void ReplaceAll (std::string& in_out, const std::string& search, const std::string& substitute);
2121
2222[[nodiscard]] inline std::vector<std::string> SplitString (std::string_view str, char sep)
2323{
Original file line number Diff line number Diff line change 2121 "src/minisketch/" ,
2222 ]
2323
24- EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string/replace.hpp" ,
25- "boost/date_time/posix_time/posix_time.hpp" ,
24+ EXPECTED_BOOST_INCLUDES = ["boost/date_time/posix_time/posix_time.hpp" ,
2625 "boost/multi_index/hashed_index.hpp" ,
2726 "boost/multi_index/ordered_index.hpp" ,
2827 "boost/multi_index/sequenced_index.hpp" ,
You can’t perform that action at this time.
0 commit comments