what-the-bank/sources/o/C12919fLP.java

41 lines
1.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.text.InputFilter;
import android.text.Spanned;
import java.util.regex.Pattern;
/* renamed from: o.fLP, reason: case insensitive filesystem */
/* loaded from: classes5.dex */
public final class C12919fLP implements InputFilter {
private Pattern b;
public C12919fLP(String str) {
this(Pattern.compile(str));
}
private C12919fLP(Pattern pattern) {
this.b = pattern;
}
@Override // android.text.InputFilter
public final CharSequence filter(CharSequence charSequence, int i, int i2, Spanned spanned, int i3, int i4) {
StringBuilder sb = new StringBuilder(spanned);
sb.replace(i3, i4, charSequence.subSequence(i, i2).toString());
guQ.c("filter input: ".concat(String.valueOf(sb)), new Object[0]);
if (this.b.matcher(sb).matches()) {
return null;
}
StringBuilder sb2 = new StringBuilder();
int length = charSequence.length();
for (int i5 = 0; i5 < length; i5++) {
if (this.b.matcher(String.valueOf(charSequence.charAt(i5))).matches()) {
sb2.append(String.valueOf(charSequence.charAt(i5)));
}
}
StringBuilder sb3 = new StringBuilder("filter output: ");
sb3.append(sb2.toString());
guQ.c(sb3.toString(), new Object[0]);
return sb2;
}
}