From 0e19f3b4cc32404f25e87ff3e00d2f06982f7f68 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 2 Jul 2019 18:15:03 -0700 Subject: [PATCH] Remove utf32 functions. These don't appear to be used by anything. Bug: N/A Test: binary inspection + code inspection Change-Id: I6c12db26c320a66bcf6e28618c6e9f61b40d985e --- libutils/String8.cpp | 15 --------------- libutils/include/utils/String8.h | 7 ------- 2 files changed, 22 deletions(-) diff --git a/libutils/String8.cpp b/libutils/String8.cpp index 0025c5648..d13548e4c 100644 --- a/libutils/String8.cpp +++ b/libutils/String8.cpp @@ -468,21 +468,6 @@ void String8::toUpper(size_t start, size_t length) unlockBuffer(len); } -size_t String8::getUtf32Length() const -{ - return utf8_to_utf32_length(mString, length()); -} - -int32_t String8::getUtf32At(size_t index, size_t *next_index) const -{ - return utf32_from_utf8_at(mString, length(), index, next_index); -} - -void String8::getUtf32(char32_t* dst) const -{ - utf8_to_utf32(mString, length(), dst); -} - // --------------------------------------------------------------------------- // Path functions diff --git a/libutils/include/utils/String8.h b/libutils/include/utils/String8.h index c8f584e30..0ddcbb2be 100644 --- a/libutils/include/utils/String8.h +++ b/libutils/include/utils/String8.h @@ -95,13 +95,6 @@ public: __attribute__((format (printf, 2, 3))); status_t appendFormatV(const char* fmt, va_list args); - // Note that this function takes O(N) time to calculate the value. - // No cache value is stored. - size_t getUtf32Length() const; - int32_t getUtf32At(size_t index, - size_t *next_index) const; - void getUtf32(char32_t* dst) const; - inline String8& operator=(const String8& other); inline String8& operator=(const char* other);