Remove boost::split

Replaced boost::split with a simple std::string_view-based split to
reduce Boost dependency and template instantiation during compilation

Tested: added UT and verified all tests passed

Change-Id: Icc84794a3d5a98088bdbce032dc76055a035f0dc
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/src/utils.cpp b/src/utils.cpp
index 0650a01..171c236 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -3,9 +3,7 @@
 
 #include "utils.hpp"
 
-#include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/replace.hpp>
-#include <boost/algorithm/string/split.hpp>
 #include <boost/container/flat_map.hpp>
 #include <boost/lexical_cast.hpp>
 #include <phosphor-logging/lg2.hpp>
@@ -180,3 +178,24 @@
 {
     return std::visit(MatchProbeForwarder(probe), dbusValue);
 }
+
+std::vector<std::string> split(std::string_view str, char delim)
+{
+    std::vector<std::string> out;
+
+    size_t start = 0;
+    while (start <= str.size())
+    {
+        size_t end = str.find(delim, start);
+        if (end == std::string_view::npos)
+        {
+            out.emplace_back(str.substr(start));
+            break;
+        }
+
+        out.emplace_back(str.substr(start, end - start));
+        start = end + 1;
+    }
+
+    return out;
+}