summaryrefslogtreecommitdiff
path: root/libutils/String16.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2021-04-06 16:49:39 -0700
committerElliott Hughes <enh@google.com>2021-04-07 22:38:20 +0000
commit016beb8559c27f5ce8f4467def164ff6a395fc3a (patch)
treed77d127158ca5b563c072230e5f13337019adfc1 /libutils/String16.cpp
parent99037347d61884ee83e48f004d6152d4730a350d (diff)
Remove String16::makeLower().
If you need to do a case transformation for a Unicode string, you need to use icu4c. This only worked for ASCII, which is just silly. Luckily it doesn't seem to be used anywhere. Test: treehugger Change-Id: I4a864823ec35a0b57b50909587cc3efac3f531a7 Merged-In: I4a864823ec35a0b57b50909587cc3efac3f531a7
Diffstat (limited to 'libutils/String16.cpp')
-rw-r--r--libutils/String16.cpp22
1 files changed, 0 insertions, 22 deletions
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<size_t>(*(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<N; i++) {
- const char16_t v = str[i];
- if (v >= 'A' && v <= 'Z') {
- if (!edited) {
- SharedBuffer* buf = static_cast<SharedBuffer*>(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();