blob: cd9d83d5572a55f3a112b82b2dc974fced68d1db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* Aaron M. Renn reported a bug in Japhar having string length 17 for
* this string
*/
public class StringTest
{
public static void
main(String[] argv)
{
UnicodeStringLength();
}
static void UnicodeStringLength()
{
String str = "a-->\u01FF\uA000\u6666\u0200RRR";
int len = str.length();
if (11 == len) {
System.out.println("PASSED: " + str + " has len=" +str.length());
} else {
System.out.println("FAILED: " + str +
" has len=" +str.length() + " != 11");
}
}
}
|