mirror of
https://github.com/corda/corda.git
synced 2024-12-28 16:58:55 +00:00
String.indexOf() should take an int, not a char
This commit is contained in:
parent
aa5e751e69
commit
77136e77cb
@ -121,7 +121,7 @@ public final class String implements Comparable<String> {
|
||||
}
|
||||
}
|
||||
|
||||
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<String> {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user