natString.cc: Include Locale.h.

* java/lang/natString.cc: Include Locale.h.
	(toUpperCase): Added `locale' argument.  Handle locale
	sensitivity.
	(toLowerCase): Added `locale' argument.  Handle locale
	sensitivity.
	(ESSET, CAPITAL_S, SMALL_I, CAPITAL_I_WITH_DOT, SMALL_DOTLESS_I,
	CAPITAL_I): New defines.
	* java/lang/String.java (CASE_INSENSITIVE_ORDER): Now public and
	final.
	Import Locale.
	(toUpperCase, toLowerCase): New methods.  Variants which accept
	locale now native.

	* java/lang/ExceptionInInitializerError.java (printStackTrace):
	New methods.

	* java/util/PropertyPermission.java: Re-merged from Classpath.

	* java/text/RuleBasedCollator.java (getCollationElementIterator):
	New method.
	* java/text/StringCharacterIterator.java: Reindented.
	(setText): New method.

From-SVN: r37539
This commit is contained in:
Tom Tromey 2000-11-18 02:29:13 +00:00 committed by Tom Tromey
parent c5f651bf3f
commit 9839499072
7 changed files with 327 additions and 159 deletions

View file

@ -176,6 +176,17 @@ public class RuleBasedCollator extends Collator
return new CollationElementIterator (expand.toString(), this);
}
public CollationElementIterator getCollationElementIterator (CharacterIterator source)
{
StringBuffer expand = new StringBuffer ();
for (char c = source.first ();
c != CharacterIterator.DONE;
c = source.next ())
decomposeCharacter (c, expand);
return new CollationElementIterator (expand.toString(), this);
}
public CollationKey getCollationKey (String source)
{
return new CollationKey (getCollationElementIterator (source), source,