mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 01:06:48 +00:00
adds a string_replace_all utility function
This commit is contained in:
@@ -56,4 +56,12 @@ BOOST_AUTO_TEST_CASE( substr_not_found ) {
|
||||
BOOST_CHECK(websocketpp::utility::ci_find_substr(haystack,needle) == haystack.end());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( string_replace_all ) {
|
||||
std::string source = "foo \"bar\" baz";
|
||||
std::string dest = "foo \\\"bar\\\" baz";
|
||||
|
||||
using websocketpp::utility::string_replace_all;
|
||||
BOOST_CHECK_EQUAL(string_replace_all(source,"\"","\\\""),dest);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
Reference in New Issue
Block a user