mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix String.contains
This commit is contained in:
parent
4b77a5d15f
commit
614f95d376
|
@ -415,7 +415,7 @@ public class TString extends TObject implements TSerializable, TComparable<TStri
|
||||||
public boolean contains(TCharSequence s) {
|
public boolean contains(TCharSequence s) {
|
||||||
int sz = length() - s.length();
|
int sz = length() - s.length();
|
||||||
outer:
|
outer:
|
||||||
for (int i = 0; i < sz; ++i) {
|
for (int i = 0; i <= sz; ++i) {
|
||||||
for (int j = 0; j < s.length(); ++j) {
|
for (int j = 0; j < s.length(); ++j) {
|
||||||
if (charAt(i + j) != s.charAt(j)) {
|
if (charAt(i + j) != s.charAt(j)) {
|
||||||
continue outer;
|
continue outer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user