Merge branch '2.0.x'

This commit is contained in:
Stephane Nicoll
2018-06-01 09:26:29 +02:00
9 changed files with 42 additions and 47 deletions

View File

@@ -99,11 +99,11 @@ final class StringSequence implements CharSequence {
return startsWith(prefix, 0);
}
public boolean startsWith(CharSequence prefix, int toffset) {
if (length() - prefix.length() - toffset < 0) {
public boolean startsWith(CharSequence prefix, int offset) {
if (length() - prefix.length() - offset < 0) {
return false;
}
return subSequence(toffset, toffset + prefix.length()).equals(prefix);
return subSequence(offset, offset + prefix.length()).equals(prefix);
}
@Override