diff --git a/libutils/String16.cpp b/libutils/String16.cpp index 70bf5a0fb..e3e5f1106 100644 --- a/libutils/String16.cpp +++ b/libutils/String16.cpp @@ -390,28 +390,6 @@ size_t String16::staticStringSize() const { return static_cast(*(p - 1)); } -status_t String16::makeLower() -{ - const size_t N = size(); - const char16_t* str = string(); - char16_t* edited = nullptr; - for (size_t i=0; i= 'A' && v <= 'Z') { - if (!edited) { - SharedBuffer* buf = static_cast(edit()); - if (!buf) { - return NO_MEMORY; - } - edited = (char16_t*)buf->data(); - mString = str = edited; - } - edited[i] = tolower((char)v); - } - } - return OK; -} - status_t String16::replaceAll(char16_t replaceThis, char16_t withThis) { const size_t N = size(); diff --git a/libutils/String16_fuzz.cpp b/libutils/String16_fuzz.cpp index 63c280071..defa0f5a6 100644 --- a/libutils/String16_fuzz.cpp +++ b/libutils/String16_fuzz.cpp @@ -34,11 +34,6 @@ std::vector void { - str1.makeLower(); - }), - // Comparison ([](FuzzedDataProvider&, android::String16 str1, android::String16 str2) -> void { str1.startsWith(str2); diff --git a/libutils/String16_test.cpp b/libutils/String16_test.cpp index 9e02b7886..788da8e0e 100644 --- a/libutils/String16_test.cpp +++ b/libutils/String16_test.cpp @@ -111,13 +111,6 @@ TEST(String16Test, RemoveOutOfBounds) { EXPECT_STR16EQ(u" me", tmp); } -TEST(String16Test, MakeLower) { - String16 tmp("Verify Me!"); - tmp.makeLower(); - EXPECT_EQ(10U, tmp.size()); - EXPECT_STR16EQ(u"verify me!", tmp); -} - TEST(String16Test, ReplaceAll) { String16 tmp("Verify verify Verify"); tmp.replaceAll(u'r', u'!'); @@ -190,14 +183,6 @@ TEST(String16Test, StaticStringRemove) { EXPECT_FALSE(tmp.isStaticString()); } -TEST(String16Test, StaticStringMakeLower) { - StaticString16 tmp(u"Verify me!"); - tmp.makeLower(); - EXPECT_EQ(10U, tmp.size()); - EXPECT_STR16EQ(u"verify me!", tmp); - EXPECT_FALSE(tmp.isStaticString()); -} - TEST(String16Test, StaticStringReplaceAll) { StaticString16 tmp(u"Verify verify Verify"); tmp.replaceAll(u'r', u'!'); diff --git a/libutils/include/utils/String16.h b/libutils/include/utils/String16.h index 1a4b47eef..5ce48c684 100644 --- a/libutils/include/utils/String16.h +++ b/libutils/include/utils/String16.h @@ -85,8 +85,6 @@ public: bool contains(const char16_t* chrs) const; - status_t makeLower(); - status_t replaceAll(char16_t replaceThis, char16_t withThis);