99 |
* @see CharData#UPPER_EXPAND |
* @see CharData#UPPER_EXPAND |
100 |
*/ |
*/ |
101 |
private static final char[] upperExpand |
private static final char[] upperExpand |
102 |
= Character.zeroBasedStringValue(CharData.UPPER_EXPAND); |
= zeroBasedStringValue(CharData.UPPER_EXPAND); |
103 |
|
|
104 |
/** |
/** |
105 |
* Stores unicode multi-character uppercase special casing table. |
* Stores unicode multi-character uppercase special casing table. |
107 |
* @see CharData#UPPER_SPECIAL |
* @see CharData#UPPER_SPECIAL |
108 |
*/ |
*/ |
109 |
private static final char[] upperSpecial |
private static final char[] upperSpecial |
110 |
= Character.zeroBasedStringValue(CharData.UPPER_SPECIAL); |
= zeroBasedStringValue(CharData.UPPER_SPECIAL); |
111 |
|
|
112 |
/** |
/** |
113 |
* Characters which make up the String. |
* Characters which make up the String. |
1669 |
} |
} |
1670 |
return upperSpecial[mid + 1]; |
return upperSpecial[mid + 1]; |
1671 |
} |
} |
1672 |
|
|
1673 |
|
/** |
1674 |
|
* Returns the value array of the given string if it is zero based or a |
1675 |
|
* copy of it that is zero based (stripping offset and making length equal |
1676 |
|
* to count). Used for accessing the char[]s of gnu.java.lang.CharData. |
1677 |
|
* Package private for use in Character. |
1678 |
|
*/ |
1679 |
|
static char[] zeroBasedStringValue(String s) |
1680 |
|
{ |
1681 |
|
char[] value; |
1682 |
|
|
1683 |
|
if (s.offset == 0 && s.count == s.value.length) |
1684 |
|
value = s.value; |
1685 |
|
else |
1686 |
|
{ |
1687 |
|
int count = s.count; |
1688 |
|
value = new char[count]; |
1689 |
|
System.arraycopy(s.value, s.offset, value, 0, count); |
1690 |
|
} |
1691 |
|
|
1692 |
|
return value; |
1693 |
|
} |
1694 |
} // class String |
} // class String |