diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 0cf24ea..3b6062a 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1395,31 +1395,27 @@
                     asyncResp->res.jsonValue["Members"];
                 memberArray = nlohmann::json::array();
 
-                for (auto& user : users)
+                for (auto& userpath : users)
                 {
-                    const std::string& path =
-                        static_cast<const std::string&>(user.first);
-                    std::size_t lastIndex = path.rfind('/');
-                    if (lastIndex == std::string::npos)
+                    std::string user = userpath.first.filename();
+                    if (user.empty())
                     {
-                        lastIndex = 0;
-                    }
-                    else
-                    {
-                        lastIndex += 1;
+                        messages::internalError(asyncResp->res);
+                        BMCWEB_LOG_ERROR << "Invalid firmware ID";
+
+                        return;
                     }
 
                     // As clarified by Redfish here:
                     // https://redfishforum.com/thread/281/manageraccountcollection-change-allows-account-enumeration
                     // Users without ConfigureUsers, only see their own account.
                     // Users with ConfigureUsers, see all accounts.
-                    if (req.session->username == path.substr(lastIndex) ||
+                    if (req.session->username == user ||
                         isAllowedWithoutConfigureSelf(req))
                     {
                         memberArray.push_back(
                             {{"@odata.id",
-                              "/redfish/v1/AccountService/Accounts/" +
-                                  path.substr(lastIndex)}});
+                              "/redfish/v1/AccountService/Accounts/" + user}});
                     }
                 }
                 asyncResp->res.jsonValue["Members@odata.count"] =
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index e73d338..159eda2 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -968,14 +968,13 @@
                     if (interface.first ==
                         "xyz.openbmc_project.Network.EthernetInterface")
                     {
-                        // Cut out everything until last "/", ...
-                        const std::string& ifaceId = objpath.first.str;
-                        std::size_t lastPos = ifaceId.rfind('/');
-                        if (lastPos != std::string::npos)
+                        std::string ifaceId = objpath.first.filename();
+                        if (ifaceId.empty())
                         {
-                            // and put it into output vector.
-                            ifaceList.emplace(ifaceId.substr(lastPos + 1));
+                            continue;
                         }
+                        // and put it into output vector.
+                        ifaceList.emplace(ifaceId);
                     }
                 }
             }
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index eff9c3c..290bac7 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -123,14 +123,17 @@
                 ifaceArray = nlohmann::json::array();
                 for (const std::string& iface : ifaceList)
                 {
-                    std::size_t lastPos = iface.rfind('/');
-                    if (lastPos != std::string::npos)
+                    sdbusplus::message::object_path path(iface);
+                    std::string name = path.filename();
+                    if (name.empty())
                     {
-                        ifaceArray.push_back(
-                            {{"@odata.id", "/redfish/v1/Systems/hypervisor/"
-                                           "EthernetInterfaces/" +
-                                               iface.substr(lastPos + 1)}});
+                        continue;
                     }
+
+                    ifaceArray.push_back(
+                        {{"@odata.id", "/redfish/v1/Systems/hypervisor/"
+                                       "EthernetInterfaces/" +
+                                           name}});
                 }
                 asyncResp->res.jsonValue["Members@odata.count"] =
                     ifaceArray.size();
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 4975a37..98a0808 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -442,14 +442,12 @@
                 uint64_t size = 0;
                 entriesArray.push_back({});
                 nlohmann::json& thisEntry = entriesArray.back();
-                const std::string& path =
-                    static_cast<const std::string&>(object.first);
-                std::size_t lastPos = path.rfind('/');
-                if (lastPos == std::string::npos)
+
+                std::string entryID = object.first.filename();
+                if (entryID.empty())
                 {
                     continue;
                 }
-                std::string entryID = path.substr(lastPos + 1);
 
                 for (auto& interfaceMap : object.second)
                 {
@@ -842,12 +840,13 @@
 
             for (const std::string& path : subTreePaths)
             {
-                std::size_t pos = path.rfind('/');
-                if (pos != std::string::npos)
+                sdbusplus::message::object_path objPath(path);
+                std::string logID = objPath.filename();
+                if (logID.empty())
                 {
-                    std::string logID = path.substr(pos + 1);
-                    deleteDumpEntry(asyncResp, logID, dumpType);
+                    continue;
                 }
+                deleteDumpEntry(asyncResp, logID, dumpType);
             }
         },
         "xyz.openbmc_project.ObjectMapper",
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 6d44171..18b2db0 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -733,15 +733,14 @@
 
                 for (auto& obj : subtree)
                 {
-                    // if can't parse fw id then return
-                    std::size_t idPos;
-                    if ((idPos = obj.first.rfind('/')) == std::string::npos)
+                    sdbusplus::message::object_path path(obj.first);
+                    std::string swId = path.filename();
+                    if (swId.empty())
                     {
                         messages::internalError(asyncResp->res);
                         BMCWEB_LOG_DEBUG << "Can't parse firmware ID!!";
                         return;
                     }
-                    std::string swId = obj.first.substr(idPos + 1);
 
                     nlohmann::json& members =
                         asyncResp->res.jsonValue["Members"];
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 95a8881..b157867 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -203,18 +203,14 @@
             for (const auto& object : subtree)
             {
                 nlohmann::json item;
-                const std::string& path =
-                    static_cast<const std::string&>(object.first);
-                std::size_t lastIndex = path.rfind('/');
-                if (lastIndex == std::string::npos)
+                std::string path = object.first.filename();
+                if (path.empty())
                 {
                     continue;
                 }
 
-                lastIndex += 1;
-
-                item["@odata.id"] = "/redfish/v1/Managers/" + name +
-                                    "/VirtualMedia/" + path.substr(lastIndex);
+                item["@odata.id"] =
+                    "/redfish/v1/Managers/" + name + "/VirtualMedia/" + *path;
 
                 members.emplace_back(std::move(item));
             }
@@ -245,16 +241,13 @@
 
             for (auto& item : subtree)
             {
-                const std::string& path =
-                    static_cast<const std::string&>(item.first);
-
-                std::size_t lastItem = path.rfind('/');
-                if (lastItem == std::string::npos)
+                std::string thispath = item.first.filename();
+                if (thispath.empty())
                 {
                     continue;
                 }
 
-                if (path.substr(lastItem + 1) != resName)
+                if (thispath != resName)
                 {
                     continue;
                 }
@@ -262,7 +255,7 @@
                 aResp->res.jsonValue = vmItemTemplate(name, resName);
 
                 // Check if dbus path is Legacy type
-                if (path.find("VirtualMedia/Legacy") != std::string::npos)
+                if (thispath.find("VirtualMedia/Legacy") != std::string::npos)
                 {
                     aResp->res.jsonValue["Actions"]["#VirtualMedia.InsertMedia"]
                                         ["target"] =
