566 lines
13 KiB
Smali
566 lines
13 KiB
Smali
.class public Lkotlin/text/w;
|
|
.super Lkotlin/text/v;
|
|
.source "_Strings.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lkotlin/text/v;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final chunked(Ljava/lang/CharSequence;I)Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/CharSequence;",
|
|
"I)",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "$this$chunked"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-static {p0, p1, p1, v0}, Lkotlin/text/l;->windowed(Ljava/lang/CharSequence;IIZ)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final drop(Ljava/lang/CharSequence;I)Ljava/lang/CharSequence;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$drop"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
invoke-interface {p0, p1, v0}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Requested character count "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " is less than zero."
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final drop(Ljava/lang/String;I)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$drop"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Requested character count "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " is less than zero."
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final dropLast(Ljava/lang/String;I)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "$this$dropLast"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v1, p1
|
|
|
|
invoke-static {v1, v0}, Lkotlin/ranges/c;->coerceAtLeast(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p0, p1}, Lkotlin/text/l;->take(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Requested character count "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " is less than zero."
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final first(Ljava/lang/CharSequence;)C
|
|
.locals 2
|
|
|
|
const-string v0, "$this$first"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-nez v0, :cond_1
|
|
|
|
invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/util/NoSuchElementException;
|
|
|
|
const-string v0, "Char sequence is empty."
|
|
|
|
invoke-direct {p0, v0}, Ljava/util/NoSuchElementException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final firstOrNull(Ljava/lang/CharSequence;)Ljava/lang/Character;
|
|
.locals 2
|
|
|
|
const-string v0, "$this$firstOrNull"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Character;->valueOf(C)Ljava/lang/Character;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final take(Ljava/lang/String;I)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "$this$take"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {p1, v1}, Lkotlin/ranges/c;->coerceAtMost(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0, v0, p1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Requested character count "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " is less than zero."
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final takeLast(Ljava/lang/String;I)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "$this$takeLast"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
|
|
|
|
move-result p1
|
|
|
|
sub-int/2addr v0, p1
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Requested character count "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, " is less than zero."
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final windowed(Ljava/lang/CharSequence;IIZ)Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/CharSequence;",
|
|
"IIZ)",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "$this$windowed"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lkotlin/text/w$a;->bjr:Lkotlin/text/w$a;
|
|
|
|
check-cast v0, Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-static {p0, p1, p2, p3, v0}, Lkotlin/text/l;->windowed(Ljava/lang/CharSequence;IIZLkotlin/jvm/functions/Function1;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final windowed(Ljava/lang/CharSequence;IIZLkotlin/jvm/functions/Function1;)Ljava/util/List;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<R:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/CharSequence;",
|
|
"IIZ",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/CharSequence;",
|
|
"+TR;>;)",
|
|
"Ljava/util/List<",
|
|
"TR;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "$this$windowed"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "transform"
|
|
|
|
invoke-static {p4, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1, p2}, Lkotlin/a/ao;->checkWindowSizeStep(II)V
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
add-int v2, v0, p2
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
div-int/2addr v2, p2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
add-int v3, v2, p1
|
|
|
|
if-le v3, v0, :cond_0
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
move v3, v0
|
|
|
|
:cond_0
|
|
invoke-interface {p0, v2, v3}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {p4, v3}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/2addr v2, p2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
check-cast v1, Ljava/util/List;
|
|
|
|
return-object v1
|
|
.end method
|