chore: remove unused string::removeChar

This commit is contained in:
sithlord48
2025-03-24 21:03:48 -04:00
committed by Nick Bolton
parent df8500178b
commit 4b24b5b38d
3 changed files with 0 additions and 21 deletions

View File

@ -253,11 +253,6 @@ void uppercase(std::string &subject)
std::transform(subject.begin(), subject.end(), subject.begin(), ::toupper);
}
void removeChar(std::string &subject, const char c)
{
subject.erase(std::remove(subject.begin(), subject.end(), c), subject.end());
}
std::string sizeTypeToString(size_t n)
{
std::stringstream ss;

View File

@ -94,12 +94,6 @@ Convert each character in \c subject to uppercase
*/
void uppercase(std::string &subject);
//! Remove all specific char in suject
/*!
Remove all specific \c c in \c suject
*/
void removeChar(std::string &subject, const char c);
//! Convert a size type to a string
/*!
Convert an size type to a string

View File

@ -100,16 +100,6 @@ TEST(StringTests, uppercase_lowercaseInput_uppercaseOutput)
EXPECT_EQ("12FOO3BAR", subject);
}
TEST(StringTests, removeChar_inputString_removeAllSpecifiedCharactors)
{
std::string subject = "foobar";
const char c = 'o';
string::removeChar(subject, c);
EXPECT_EQ("fbar", subject);
}
TEST(StringTests, intToString_inputInt_outputString)
{
size_t value = 123;