The java.text.Collator class specification gives the following,
* The following shows how both case and accents could be ignored for
* US English.
* {@snippet lang=java :
* // Get the Collator for US English and set its strength to PRIMARY
* Collator usCollator = Collator.getInstance(Locale.US);
* usCollator.setStrength(Collator.PRIMARY);
* if (usCollator.compare("abc", "ABC") == 0) {
* System.out.println("Strings are equivalent");
* }
* }
That is, the wording implies the example will ignore case and accents. In reality, it only ignores case. We should update the example to reflect the wording.
* The following shows how both case and accents could be ignored for
* US English.
* {@snippet lang=java :
* // Get the Collator for US English and set its strength to PRIMARY
* Collator usCollator = Collator.getInstance(Locale.US);
* usCollator.setStrength(Collator.PRIMARY);
* if (usCollator.compare("abc", "ABC") == 0) {
* System.out.println("Strings are equivalent");
* }
* }
That is, the wording implies the example will ignore case and accents. In reality, it only ignores case. We should update the example to reflect the wording.