Replace boost starts_with with std::string
C++20 introduces std::string::starts_with, which provides standard,
efficient, and header-light ways to check string prefixes and
suffixes.
Replacing boost::starts_with reduces Boost dependencies, and improves
compilation performance.
Change-Id: I5f146d9a1abe6d04d95f8228853139eda773218c
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/src/entity_manager/utils.cpp b/src/entity_manager/utils.cpp
index 8af3dce..3e4a805 100644
--- a/src/entity_manager/utils.cpp
+++ b/src/entity_manager/utils.cpp
@@ -6,7 +6,6 @@
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/find.hpp>
-#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/split.hpp>
#include <sdbusplus/bus/match.hpp>
@@ -205,7 +204,7 @@
std::string_view strView = *strPtr;
int base = 10;
- if (boost::starts_with(strView, "0x"))
+ if (strView.starts_with("0x"))
{
strView.remove_prefix(2);
base = 16;