summaryrefslogtreecommitdiff
path: root/libs/utils/Unicode.cpp
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-02-12 13:01:16 -0800
committerKenny Root <kroot@google.com>2010-02-12 13:01:16 -0800
commit564bfc27f253694183f5972cdda6357c66bd7bbd (patch)
treeb9af3f503d7183a8f9f1cf5fe99fcf391eaa0c89 /libs/utils/Unicode.cpp
parent965e37ec88609c36a3c5461ece459a96abb6f7ca (diff)
Excise code from Unicode.cpp that was dead
Remove some utility functions for discovering character data that ICU probably took over a while ago. Change-Id: I97abe4de2f51eb2bf48679941258bc501184c3dc
Diffstat (limited to 'libs/utils/Unicode.cpp')
-rw-r--r--libs/utils/Unicode.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/libs/utils/Unicode.cpp b/libs/utils/Unicode.cpp
index f92703e7f0e8..65dbb4a3e63a 100644
--- a/libs/utils/Unicode.cpp
+++ b/libs/utils/Unicode.cpp
@@ -103,55 +103,6 @@ uint32_t android::Unicode::getPackedData(UChar32 c)
return CharacterData::PACKED_DATA[findCharacterValue(c) & 0x7FF];
}
-android::Unicode::CharType android::Unicode::getType(UChar32 c)
-{
- if (c < 0 || c >= 0x10FFFF)
- return CHARTYPE_UNASSIGNED;
- return (CharType)((getPackedData(c) >> TYPE_SHIFT) & TYPE_MASK);
-}
-
-android::Unicode::DecompositionType android::Unicode::getDecompositionType(UChar32 c)
-{
- // findCharacterValue returns a 16-bit value with the top 5 bits containing a decomposition type
- // and the remaining bits containing an index.
- return (DecompositionType)((findCharacterValue(c) >> DECOMPOSITION_SHIFT) & DECOMPOSITION_MASK);
-}
-
-int android::Unicode::getDigitValue(UChar32 c, int radix)
-{
- if (radix < MIN_RADIX || radix > MAX_RADIX)
- return -1;
-
- int tempValue = radix;
-
- if (c >= '0' && c <= '9')
- tempValue = c - '0';
- else if (c >= 'a' && c <= 'z')
- tempValue = c - 'a' + 10;
- else if (c >= 'A' && c <= 'Z')
- tempValue = c - 'A' + 10;
-
- return tempValue < radix ? tempValue : -1;
-}
-
-int android::Unicode::getNumericValue(UChar32 c)
-{
- if (isMirrored(c))
- return -1;
-
- return (int) CharacterData::NUMERICS[((getPackedData(c) >> NUMERIC_SHIFT) & NUMERIC_MASK)];
-}
-
-UChar32 android::Unicode::toLower(UChar32 c)
-{
- return c + CharacterData::LCDIFF[(getPackedData(c) >> TOLOWER_SHIFT) & TOLOWER_MASK];
-}
-
-UChar32 android::Unicode::toUpper(UChar32 c)
-{
- return c + CharacterData::UCDIFF[(getPackedData(c) >> TOUPPER_SHIFT) & TOUPPER_MASK];
-}
-
android::Unicode::Direction android::Unicode::getDirectionality(UChar32 c)
{
uint32_t data = getPackedData(c);
@@ -179,15 +130,3 @@ UChar32 android::Unicode::toMirror(UChar32 c)
return c + CharacterData::MIRROR_DIFF[(getPackedData(c) >> MIRROR_SHIFT) & MIRROR_MASK];
}
-
-UChar32 android::Unicode::toTitle(UChar32 c)
-{
- int32_t diff = CharacterData::TCDIFF[(getPackedData(c) >> TOTITLE_SHIFT) & TOTITLE_MASK];
-
- if (TOTITLE_MASK == diff)
- return toUpper(c);
-
- return c + diff;
-}
-
-