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

87 lines
2.9 KiB
Java

package o;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
/* renamed from: o.geq, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C15022geq extends C15016gek {
public static final char e(CharSequence charSequence) {
C14957gcv.e(charSequence, "");
if (charSequence.length() == 0) {
throw new NoSuchElementException("Char sequence is empty.");
}
return charSequence.charAt(0);
}
public static final String e(String str, int i) {
C14957gcv.e(str, "");
if (i < 0) {
StringBuilder sb = new StringBuilder("Requested character count ");
sb.append(i);
sb.append(" is less than zero.");
throw new IllegalArgumentException(sb.toString().toString());
}
int length = str.length();
if (i > length) {
i = length;
}
String substring = str.substring(i);
C14957gcv.c((Object) substring, "");
return substring;
}
public static final String b(String str, int i) {
C14957gcv.e(str, "");
if (i < 0) {
StringBuilder sb = new StringBuilder("Requested character count ");
sb.append(i);
sb.append(" is less than zero.");
throw new IllegalArgumentException(sb.toString().toString());
}
int length = str.length();
if (i > length) {
i = length;
}
String substring = str.substring(0, i);
C14957gcv.c((Object) substring, "");
return substring;
}
/* renamed from: o.geq$RVV */
/* loaded from: classes.dex */
public static final class RVV extends AbstractC14961gcz implements InterfaceC14894gbR<CharSequence, String> {
public static final RVV e = new RVV();
@Override // o.InterfaceC14894gbR
public final /* synthetic */ String invoke(CharSequence charSequence) {
CharSequence charSequence2 = charSequence;
C14957gcv.e(charSequence2, "");
return charSequence2.toString();
}
RVV() {
super(1);
}
}
public static final <R> List<R> e(CharSequence charSequence, int i, int i2, InterfaceC14894gbR<? super CharSequence, ? extends R> interfaceC14894gbR) {
C14957gcv.e(charSequence, "");
C14957gcv.e(interfaceC14894gbR, "");
C14901gbc.e(i, i2);
int length = charSequence.length();
int i3 = 0;
ArrayList arrayList = new ArrayList((length / i2) + (length % i2 == 0 ? 0 : 1));
while (i3 >= 0 && i3 < length) {
int i4 = i3 + i;
if (i4 < 0 || i4 > length) {
i4 = length;
}
arrayList.add(interfaceC14894gbR.invoke(charSequence.subSequence(i3, i4)));
i3 += i2;
}
return arrayList;
}
}