Replace boost starts_with/ends_with with std::string
C++20 introduces std::string::starts_with and std::string::ends_with,
which provide standard, efficient, and header-light ways to check
string prefixes and suffixes. Replacing boost::algorithm::starts_with
and boost::algorithm::ends_with reduces Boost dependencies,
simplifies includes, and improves compilation performance.
Change-Id: I611ccb49a174dcd5433c1001cf1750907dd023ac
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/dbus-sdr/sensorcommands.cpp b/dbus-sdr/sensorcommands.cpp
index f3b1720..06d039a 100644
--- a/dbus-sdr/sensorcommands.cpp
+++ b/dbus-sdr/sensorcommands.cpp
@@ -521,7 +521,7 @@
#ifdef SHORTNAME_REMOVE_SUFFIX
for (const auto& suffix : suffixes)
{
- if (boost::ends_with(name, suffix))
+ if (name.ends_with(suffix))
{
boost::replace_all(name, suffix, "");
break;