File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 4
4
5
5
#include < util/string.h>
6
6
7
- #include < boost/algorithm/string/replace.hpp>
8
-
7
+ #include < regex>
9
8
#include < string>
9
+ #include < utility>
10
10
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)
12
12
{
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);
14
15
}
Original file line number Diff line number Diff line change 17
17
#include < string_view>
18
18
#include < vector>
19
19
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);
21
21
22
22
[[nodiscard]] inline std::vector<std::string> SplitString (std::string_view str, char sep)
23
23
{
Original file line number Diff line number Diff line change 21
21
"src/minisketch/" ,
22
22
]
23
23
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" ,
26
25
"boost/multi_index/hashed_index.hpp" ,
27
26
"boost/multi_index/ordered_index.hpp" ,
28
27
"boost/multi_index/sequenced_index.hpp" ,
You can’t perform that action at this time.
0 commit comments