chore: remove unused string::removeChar
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user