more progress on GNU Classpath compatibility

This commit is contained in:
Joel Dice
2009-06-04 17:21:42 -06:00
parent 4a87d82d8e
commit 0857f53651
5 changed files with 215 additions and 17 deletions

View File

@ -596,7 +596,9 @@ public final class String
}
public static String valueOf(int v) {
return Integer.toString(v);
// use Integer.toString(int, int), because GNU Classpath's
// Integer.toString(int) just calls String.valueOf(int):
return Integer.toString(v, 10);
}
public static String valueOf(long v) {
@ -615,6 +617,10 @@ public final class String
return new String(data, offset, length);
}
public static String valueOf(char[] data) {
return valueOf(data, 0, data.length);
}
public int lastIndexOf(int ch, int lastIndex) {
for (int i = lastIndex ; i >= 0; --i) {
if (charAt(i) == ch) {