From 77136e77cb7d578f0fd9b0c3f488991e68aeb37c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 18 Aug 2007 15:22:43 -0600 Subject: [PATCH] String.indexOf() should take an int, not a char --- classpath/java/lang/String.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classpath/java/lang/String.java b/classpath/java/lang/String.java index ef59bebe41..df3f1bf3d1 100644 --- a/classpath/java/lang/String.java +++ b/classpath/java/lang/String.java @@ -121,7 +121,7 @@ public final class String implements Comparable { } } - public int indexOf(char c) { + public int indexOf(int c) { for (int i = 0; i < length - 1; ++i) { if (charAt(i) == c) { return i; @@ -131,7 +131,7 @@ public final class String implements Comparable { return -1; } - public int lastIndexOf(char c) { + public int lastIndexOf(int c) { for (int i = length - 1; i >= 0; --i) { if (charAt(i) == c) { return i;