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/fru_device/fru_device.cpp b/src/fru_device/fru_device.cpp
index f45766c..9b13a2c 100644
--- a/src/fru_device/fru_device.cpp
+++ b/src/fru_device/fru_device.cpp
@@ -8,7 +8,6 @@
#include <sys/inotify.h>
#include <sys/ioctl.h>
-#include <boost/algorithm/string/predicate.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/container/flat_map.hpp>
@@ -1475,7 +1474,7 @@
case IN_DELETE:
{
std::string_view name(&iEvent->name[0], iEvent->len);
- if (boost::starts_with(name, "i2c"))
+ if (name.starts_with("i2c"))
{
int bus = busStrToInt(name);
if (bus < 0)