Merge "Remove String8::toUpper()." am: 450f66bd8f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1673886
Change-Id: I981fd2a3da5f4a918b9bfae7cf0df626e7ca68a4
diff --git a/libutils/String8.cpp b/libutils/String8.cpp
index fad130b..2974aa3 100644
--- a/libutils/String8.cpp
+++ b/libutils/String8.cpp
@@ -426,19 +426,6 @@
unlockBuffer(length);
}
-void String8::toUpper()
-{
- const size_t length = size();
- if (length == 0) return;
-
- char* buf = lockBuffer(length);
- for (size_t i = length; i > 0; --i) {
- *buf = static_cast<char>(toupper(*buf));
- buf++;
- }
- unlockBuffer(length);
-}
-
// ---------------------------------------------------------------------------
// Path functions
diff --git a/libutils/String8_fuzz.cpp b/libutils/String8_fuzz.cpp
index b02683c..a45d675 100644
--- a/libutils/String8_fuzz.cpp
+++ b/libutils/String8_fuzz.cpp
@@ -42,9 +42,6 @@
// Casing
[](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
- str1->toUpper();
- },
- [](FuzzedDataProvider*, android::String8* str1, android::String8*) -> void {
str1->toLower();
},
[](FuzzedDataProvider*, android::String8* str1, android::String8* str2) -> void {
diff --git a/libutils/include/utils/String8.h b/libutils/include/utils/String8.h
index 84f14d0..cee5dc6 100644
--- a/libutils/include/utils/String8.h
+++ b/libutils/include/utils/String8.h
@@ -130,7 +130,6 @@
bool removeAll(const char* other);
void toLower();
- void toUpper();
/*