From 541e30f4069f9c2e7b64d812c90d7eeb92bbd0e9 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 24 Mar 2025 21:06:08 -0400 Subject: [PATCH] chore: remove unused string::removeFileExt --- src/lib/base/String.cpp | 11 ----------- src/lib/base/String.h | 6 ------ 2 files changed, 17 deletions(-) diff --git a/src/lib/base/String.cpp b/src/lib/base/String.cpp index 85c7d0c9e..5f490959a 100644 --- a/src/lib/base/String.cpp +++ b/src/lib/base/String.cpp @@ -156,17 +156,6 @@ void findReplaceAll(std::string &subject, const std::string &find, const std::st } } -std::string removeFileExt(std::string filename) -{ - size_t dot = filename.find_last_of('.'); - - if (dot == std::string::npos) { - return filename; - } - - return filename.substr(0, dot); -} - std::string toHex(const std::string &subject, int width, const char fill) { std::stringstream ss; diff --git a/src/lib/base/String.h b/src/lib/base/String.h index ad5beb38a..431108812 100644 --- a/src/lib/base/String.h +++ b/src/lib/base/String.h @@ -52,12 +52,6 @@ Finds \c find inside \c subject and replaces it with \c replace */ void findReplaceAll(std::string &subject, const std::string &find, const std::string &replace); -//! Remove file extension -/*! -Finds the last dot and remove all characters from the dot to the end -*/ -std::string removeFileExt(std::string filename); - //! Convert into hexdecimal /*! Convert each character in \c subject into hexdecimal form with \c width