Replace boost::replace_all and boost::ireplace_all
Replaced with custom functions using std::string_view to remove Boost
dependency and reduce template instantiation, keeping original
behavior.
Tested: added UT and verified all tests passed
Change-Id: I82cc238c800c7780dc50b6a40445657931bf5250
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/src/entity_manager/overlay.cpp b/src/entity_manager/overlay.cpp
index 534c68f..ce41bca 100644
--- a/src/entity_manager/overlay.cpp
+++ b/src/entity_manager/overlay.cpp
@@ -3,10 +3,10 @@
 
 #include "overlay.hpp"
 
+#include "../utils.hpp"
 #include "devices.hpp"
 #include "utils.hpp"
 
-#include <boost/algorithm/string/replace.hpp>
 #include <boost/asio/io_context.hpp>
 #include <boost/asio/steady_timer.hpp>
 #include <boost/container/flat_map.hpp>
@@ -39,7 +39,7 @@
         // remove brackets and comma from array
         std::string array = in.dump();
         array = array.substr(1, array.size() - 2);
-        boost::replace_all(array, ",", " ");
+        std::ranges::replace(array, ',', ' ');
         return array;
     }
     return in.dump();
@@ -247,10 +247,8 @@
         {
             channels = keyPair.value().get<std::vector<std::string>>();
         }
-        boost::replace_all(parameters, templateChar + keyPair.key(),
-                           subsituteString);
-        boost::replace_all(busPath, templateChar + keyPair.key(),
-                           subsituteString);
+        replaceAll(parameters, templateChar + keyPair.key(), subsituteString);
+        replaceAll(busPath, templateChar + keyPair.key(), subsituteString);
     }
 
     if (!bus || !address)