.class Lkotlin/text/StringsKt__IndentKt; .super Lkotlin/text/StringsKt__AppendableKt; .source "Indent.kt" # annotations .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nIndent.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Indent.kt\nkotlin/text/StringsKt__IndentKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 _Strings.kt\nkotlin/text/StringsKt___StringsKt\n*L\n1#1,123:1\n113#1,2:125\n115#1,4:140\n120#1,2:153\n113#1,2:162\n115#1,4:177\n120#1,2:184\n1#2:124\n1#2:150\n1#2:181\n1#2:205\n1569#3,11:127\n1864#3,2:138\n1866#3:151\n1580#3:152\n766#3:155\n857#3,2:156\n1549#3:158\n1620#3,3:159\n1569#3,11:164\n1864#3,2:175\n1866#3:182\n1580#3:183\n1569#3,11:192\n1864#3,2:203\n1866#3:206\n1580#3:207\n151#4,6:144\n151#4,6:186\n*S KotlinDebug\n*F\n+ 1 Indent.kt\nkotlin/text/StringsKt__IndentKt\n*L\n38#1:125,2\n38#1:140,4\n38#1:153,2\n78#1:162,2\n78#1:177,4\n78#1:184,2\n38#1:150\n78#1:181\n114#1:205\n38#1:127,11\n38#1:138,2\n38#1:151\n38#1:152\n74#1:155\n74#1:156,2\n75#1:158\n75#1:159,3\n78#1:164,11\n78#1:175,2\n78#1:182\n78#1:183\n114#1:192,11\n114#1:203,2\n114#1:206\n114#1:207\n39#1:144,6\n101#1:186,6\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; d1 = { "\u0000\u001e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0002\u0008\u0003\n\u0002\u0010 \n\u0002\u0008\u000b\u001a!\u0010\u0000\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0002H\u0002\u00a2\u0006\u0002\u0008\u0004\u001a\u0011\u0010\u0005\u001a\u00020\u0006*\u00020\u0002H\u0002\u00a2\u0006\u0002\u0008\u0007\u001a\u0014\u0010\u0008\u001a\u00020\u0002*\u00020\u00022\u0008\u0008\u0002\u0010\u0003\u001a\u00020\u0002\u001aJ\u0010\t\u001a\u00020\u0002*\u0008\u0012\u0004\u0012\u00020\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00062\u0012\u0010\u000c\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00020\u00012\u0014\u0010\r\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u0001H\u0082\u0008\u00a2\u0006\u0002\u0008\u000e\u001a\u0014\u0010\u000f\u001a\u00020\u0002*\u00020\u00022\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u0002\u001a\u001e\u0010\u0011\u001a\u00020\u0002*\u00020\u00022\u0008\u0008\u0002\u0010\u0010\u001a\u00020\u00022\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0002\u001a\u000c\u0010\u0013\u001a\u00020\u0002*\u00020\u0002H\u0007\u001a\u0016\u0010\u0014\u001a\u00020\u0002*\u00020\u00022\u0008\u0008\u0002\u0010\u0012\u001a\u00020\u0002H\u0007\u00a8\u0006\u0015" } d2 = { "getIndentFunction", "Lkotlin/Function1;", "", "indent", "getIndentFunction$StringsKt__IndentKt", "indentWidth", "", "indentWidth$StringsKt__IndentKt", "prependIndent", "reindent", "", "resultSizeEstimate", "indentAddFunction", "indentCutFunction", "reindent$StringsKt__IndentKt", "replaceIndent", "newIndent", "replaceIndentByMargin", "marginPrefix", "trimIndent", "trimMargin", "kotlin-stdlib" } k = 0x5 mv = { 0x1, 0x9, 0x0 } xi = 0x31 xs = "kotlin/text/StringsKt" .end annotation # direct methods .method public constructor ()V .locals 0 invoke-direct {p0}, Lkotlin/text/StringsKt__AppendableKt;->()V return-void .end method .method private static final getIndentFunction$StringsKt__IndentKt(Ljava/lang/String;)Lkotlin/jvm/functions/Function1; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", ")", "Lkotlin/jvm/functions/Function1<", "Ljava/lang/String;", "Ljava/lang/String;", ">;" } .end annotation .line 104 move-object v0, p0 check-cast v0, Ljava/lang/CharSequence; invoke-interface {v0}, Ljava/lang/CharSequence;->length()I move-result v0 if-nez v0, :cond_0 sget-object p0, Lkotlin/text/StringsKt__IndentKt$getIndentFunction$1;->INSTANCE:Lkotlin/text/StringsKt__IndentKt$getIndentFunction$1; check-cast p0, Lkotlin/jvm/functions/Function1; goto :goto_0 .line 105 :cond_0 new-instance v0, Lkotlin/text/StringsKt__IndentKt$getIndentFunction$2; invoke-direct {v0, p0}, Lkotlin/text/StringsKt__IndentKt$getIndentFunction$2;->(Ljava/lang/String;)V move-object p0, v0 check-cast p0, Lkotlin/jvm/functions/Function1; :goto_0 return-object p0 .end method .method private static final indentWidth$StringsKt__IndentKt(Ljava/lang/String;)I .locals 5 .line 101 move-object v0, p0 check-cast v0, Ljava/lang/CharSequence; .line 186 invoke-interface {v0}, Ljava/lang/CharSequence;->length()I move-result v1 const/4 v2, 0x0 :goto_0 const/4 v3, -0x1 if-ge v2, v1, :cond_1 .line 187 invoke-interface {v0, v2}, Ljava/lang/CharSequence;->charAt(I)C move-result v4 .line 101 invoke-static {v4}, Lkotlin/text/CharsKt;->isWhitespace(C)Z move-result v4 xor-int/lit8 v4, v4, 0x1 if-eqz v4, :cond_0 goto :goto_1 :cond_0 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_1 move v2, v3 :goto_1 if-ne v2, v3, :cond_2 invoke-virtual {p0}, Ljava/lang/String;->length()I move-result v2 :cond_2 return v2 .end method .method public static final prependIndent(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 10 const-string v0, "" invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "indent" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 87 check-cast p0, Ljava/lang/CharSequence; invoke-static {p0}, Lkotlin/text/StringsKt;->lineSequence(Ljava/lang/CharSequence;)Lkotlin/sequences/Sequence; move-result-object p0 .line 88 new-instance v0, Lkotlin/text/StringsKt__IndentKt$prependIndent$1; invoke-direct {v0, p1}, Lkotlin/text/StringsKt__IndentKt$prependIndent$1;->(Ljava/lang/String;)V check-cast v0, Lkotlin/jvm/functions/Function1; invoke-static {p0, v0}, Lkotlin/sequences/SequencesKt;->map(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; move-result-object v1 const-string p0, "\n" .line 99 move-object v2, p0 check-cast v2, Ljava/lang/CharSequence; const/4 v3, 0x0 const/4 v4, 0x0 const/4 v5, 0x0 const/4 v6, 0x0 const/4 v7, 0x0 const/16 v8, 0x3e const/4 v9, 0x0 invoke-static/range {v1 .. v9}, Lkotlin/sequences/SequencesKt;->joinToString$default(Lkotlin/sequences/Sequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static synthetic prependIndent$default(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; .locals 0 and-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_0 const-string p1, " " .line 86 :cond_0 invoke-static {p0, p1}, Lkotlin/text/StringsKt;->prependIndent(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method private static final reindent$StringsKt__IndentKt(Ljava/util/List;ILkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ljava/lang/String; .locals 12 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Ljava/lang/String;", ">;I", "Lkotlin/jvm/functions/Function1<", "-", "Ljava/lang/String;", "Ljava/lang/String;", ">;", "Lkotlin/jvm/functions/Function1<", "-", "Ljava/lang/String;", "Ljava/lang/String;", ">;)", "Ljava/lang/String;" } .end annotation .line 113 invoke-static {p0}, Lkotlin/collections/CollectionsKt;->getLastIndex(Ljava/util/List;)I move-result v0 .line 114 check-cast p0, Ljava/lang/Iterable; .line 192 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V check-cast v1, Ljava/util/Collection; .line 204 invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p0 const/4 v2, 0x0 move v3, v2 :goto_0 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result v4 if-eqz v4, :cond_7 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 add-int/lit8 v5, v3, 0x1 if-gez v3, :cond_1 const/4 v6, 0x3 const/4 v7, 0x1 invoke-static {v7, v6, v2}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z move-result v6 if-eqz v6, :cond_0 invoke-static {}, Lkotlin/collections/CollectionsKt;->throwIndexOverflow()V goto :goto_1 :cond_0 new-instance p0, Ljava/lang/ArithmeticException; const-string p1, "Index overflow has happened." invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;->(Ljava/lang/String;)V throw p0 .line 202 :cond_1 :goto_1 check-cast v4, Ljava/lang/String; if-eqz v3, :cond_2 if-ne v3, v0, :cond_3 .line 115 :cond_2 move-object v3, v4 check-cast v3, Ljava/lang/CharSequence; invoke-static {v3}, Lkotlin/text/StringsKt;->isBlank(Ljava/lang/CharSequence;)Z move-result v3 if-eqz v3, :cond_3 const/4 v4, 0x0 goto :goto_2 .line 118 :cond_3 invoke-interface {p3, v4}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/String; if-eqz v3, :cond_5 invoke-interface {p2, v3}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/String; if-nez v3, :cond_4 goto :goto_2 :cond_4 move-object v4, v3 :cond_5 :goto_2 if-eqz v4, :cond_6 .line 202 invoke-interface {v1, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z :cond_6 move v3, v5 goto :goto_0 .line 207 :cond_7 check-cast v1, Ljava/util/List; .line 192 move-object v2, v1 check-cast v2, Ljava/lang/Iterable; .line 120 new-instance p0, Ljava/lang/StringBuilder; invoke-direct {p0, p1}, Ljava/lang/StringBuilder;->(I)V move-object v3, p0 check-cast v3, Ljava/lang/Appendable; const-string p0, "\n" move-object v4, p0 check-cast v4, Ljava/lang/CharSequence; const/4 v5, 0x0 const/4 v6, 0x0 const/4 v7, 0x0 const/4 v8, 0x0 const/4 v9, 0x0 const/16 v10, 0x7c const/4 v11, 0x0 invoke-static/range {v2 .. v11}, Lkotlin/collections/CollectionsKt;->joinTo$default(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Appendable; move-result-object p0 check-cast p0, Ljava/lang/StringBuilder; .line 121 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 const-string p1, "toString(...)" .line 120 invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object p0 .end method .method public static final replaceIndent(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 17 move-object/from16 v0, p0 const-string v1, "" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v1, "newIndent" move-object/from16 v2, p1 invoke-static {v2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 71 move-object v1, v0 check-cast v1, Ljava/lang/CharSequence; invoke-static {v1}, Lkotlin/text/StringsKt;->lines(Ljava/lang/CharSequence;)Ljava/util/List; move-result-object v1 .line 73 move-object v3, v1 check-cast v3, Ljava/lang/Iterable; .line 155 new-instance v4, Ljava/util/ArrayList; invoke-direct {v4}, Ljava/util/ArrayList;->()V check-cast v4, Ljava/util/Collection; .line 156 invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v5 :cond_0 :goto_0 invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z move-result v6 if-eqz v6, :cond_1 invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v6 move-object v7, v6 check-cast v7, Ljava/lang/String; .line 74 check-cast v7, Ljava/lang/CharSequence; invoke-static {v7}, Lkotlin/text/StringsKt;->isBlank(Ljava/lang/CharSequence;)Z move-result v7 xor-int/lit8 v7, v7, 0x1 if-eqz v7, :cond_0 .line 156 invoke-interface {v4, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z goto :goto_0 .line 157 :cond_1 check-cast v4, Ljava/util/List; .line 74 check-cast v4, Ljava/lang/Iterable; .line 158 new-instance v5, Ljava/util/ArrayList; const/16 v6, 0xa invoke-static {v4, v6}, Lkotlin/collections/CollectionsKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I move-result v6 invoke-direct {v5, v6}, Ljava/util/ArrayList;->(I)V check-cast v5, Ljava/util/Collection; .line 159 invoke-interface {v4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v4 :goto_1 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v6 if-eqz v6, :cond_2 invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v6 .line 160 check-cast v6, Ljava/lang/String; .line 75 invoke-static {v6}, Lkotlin/text/StringsKt__IndentKt;->indentWidth$StringsKt__IndentKt(Ljava/lang/String;)I move-result v6 invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v6 .line 160 invoke-interface {v5, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z goto :goto_1 .line 161 :cond_2 check-cast v5, Ljava/util/List; .line 75 check-cast v5, Ljava/lang/Iterable; .line 76 invoke-static {v5}, Lkotlin/collections/CollectionsKt;->minOrNull(Ljava/lang/Iterable;)Ljava/lang/Comparable; move-result-object v4 check-cast v4, Ljava/lang/Integer; const/4 v5, 0x0 if-eqz v4, :cond_3 .line 73 invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I move-result v4 goto :goto_2 :cond_3 move v4, v5 .line 78 :goto_2 invoke-virtual/range {p0 .. p0}, Ljava/lang/String;->length()I move-result v0 invoke-virtual/range {p1 .. p1}, Ljava/lang/String;->length()I move-result v6 invoke-interface {v1}, Ljava/util/List;->size()I move-result v7 mul-int/2addr v6, v7 add-int/2addr v0, v6 invoke-static/range {p1 .. p1}, Lkotlin/text/StringsKt__IndentKt;->getIndentFunction$StringsKt__IndentKt(Ljava/lang/String;)Lkotlin/jvm/functions/Function1; move-result-object v2 .line 162 invoke-static {v1}, Lkotlin/collections/CollectionsKt;->getLastIndex(Ljava/util/List;)I move-result v1 .line 164 new-instance v6, Ljava/util/ArrayList; invoke-direct {v6}, Ljava/util/ArrayList;->()V check-cast v6, Ljava/util/Collection; .line 176 invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v3 :goto_3 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v7 if-eqz v7, :cond_a invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v7 add-int/lit8 v8, v5, 0x1 if-gez v5, :cond_4 invoke-static {}, Lkotlin/collections/CollectionsKt;->throwIndexOverflow()V .line 174 :cond_4 check-cast v7, Ljava/lang/String; if-eqz v5, :cond_5 if-ne v5, v1, :cond_6 .line 177 :cond_5 move-object v5, v7 check-cast v5, Ljava/lang/CharSequence; invoke-static {v5}, Lkotlin/text/StringsKt;->isBlank(Ljava/lang/CharSequence;)Z move-result v5 if-eqz v5, :cond_6 const/4 v7, 0x0 goto :goto_4 .line 78 :cond_6 invoke-static {v7, v4}, Lkotlin/text/StringsKt;->drop(Ljava/lang/String;I)Ljava/lang/String; move-result-object v5 if-eqz v5, :cond_8 .line 180 invoke-interface {v2, v5}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v5 check-cast v5, Ljava/lang/String; if-nez v5, :cond_7 goto :goto_4 :cond_7 move-object v7, v5 :cond_8 :goto_4 if-eqz v7, :cond_9 .line 174 invoke-interface {v6, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z :cond_9 move v5, v8 goto :goto_3 .line 183 :cond_a check-cast v6, Ljava/util/List; .line 164 move-object v7, v6 check-cast v7, Ljava/lang/Iterable; .line 184 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1, v0}, Ljava/lang/StringBuilder;->(I)V move-object v8, v1 check-cast v8, Ljava/lang/Appendable; const-string v0, "\n" move-object v9, v0 check-cast v9, Ljava/lang/CharSequence; const/4 v10, 0x0 const/4 v11, 0x0 const/4 v12, 0x0 const/4 v13, 0x0 const/4 v14, 0x0 const/16 v15, 0x7c const/16 v16, 0x0 invoke-static/range {v7 .. v16}, Lkotlin/collections/CollectionsKt;->joinTo$default(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Appendable; move-result-object v0 check-cast v0, Ljava/lang/StringBuilder; .line 185 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "toString(...)" .line 184 invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public static synthetic replaceIndent$default(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; .locals 0 and-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_0 const-string p1, "" .line 70 :cond_0 invoke-static {p0, p1}, Lkotlin/text/StringsKt;->replaceIndent(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static final replaceIndentByMargin(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 21 move-object/from16 v0, p0 move-object/from16 v6, p2 const-string v1, "" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v1, "newIndent" move-object/from16 v2, p1 invoke-static {v2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v1, "marginPrefix" invoke-static {v6, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 35 move-object v1, v6 check-cast v1, Ljava/lang/CharSequence; invoke-static {v1}, Lkotlin/text/StringsKt;->isBlank(Ljava/lang/CharSequence;)Z move-result v1 xor-int/lit8 v1, v1, 0x1 if-eqz v1, :cond_b .line 36 move-object v1, v0 check-cast v1, Ljava/lang/CharSequence; invoke-static {v1}, Lkotlin/text/StringsKt;->lines(Ljava/lang/CharSequence;)Ljava/util/List; move-result-object v1 .line 38 invoke-virtual/range {p0 .. p0}, Ljava/lang/String;->length()I move-result v0 invoke-virtual/range {p1 .. p1}, Ljava/lang/String;->length()I move-result v3 invoke-interface {v1}, Ljava/util/List;->size()I move-result v4 mul-int/2addr v3, v4 add-int v7, v0, v3 invoke-static/range {p1 .. p1}, Lkotlin/text/StringsKt__IndentKt;->getIndentFunction$StringsKt__IndentKt(Ljava/lang/String;)Lkotlin/jvm/functions/Function1; move-result-object v8 .line 125 invoke-static {v1}, Lkotlin/collections/CollectionsKt;->getLastIndex(Ljava/util/List;)I move-result v9 .line 126 check-cast v1, Ljava/lang/Iterable; .line 127 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V move-object v10, v0 check-cast v10, Ljava/util/Collection; .line 139 invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v11 const/4 v12, 0x0 move v0, v12 :goto_0 invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_a invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 add-int/lit8 v13, v0, 0x1 if-gez v0, :cond_0 invoke-static {}, Lkotlin/collections/CollectionsKt;->throwIndexOverflow()V .line 137 :cond_0 move-object v14, v1 check-cast v14, Ljava/lang/String; const/4 v15, 0x0 if-eqz v0, :cond_1 if-ne v0, v9, :cond_2 .line 140 :cond_1 move-object v0, v14 check-cast v0, Ljava/lang/CharSequence; invoke-static {v0}, Lkotlin/text/StringsKt;->isBlank(Ljava/lang/CharSequence;)Z move-result v0 if-eqz v0, :cond_2 move-object v14, v15 goto :goto_4 .line 39 :cond_2 move-object v0, v14 check-cast v0, Ljava/lang/CharSequence; .line 144 invoke-interface {v0}, Ljava/lang/CharSequence;->length()I move-result v1 move v2, v12 :goto_1 const/4 v3, -0x1 if-ge v2, v1, :cond_4 .line 145 invoke-interface {v0, v2}, Ljava/lang/CharSequence;->charAt(I)C move-result v4 .line 39 invoke-static {v4}, Lkotlin/text/CharsKt;->isWhitespace(C)Z move-result v4 xor-int/lit8 v4, v4, 0x1 if-eqz v4, :cond_3 move v5, v2 goto :goto_2 :cond_3 add-int/lit8 v2, v2, 0x1 goto :goto_1 :cond_4 move v5, v3 :goto_2 if-ne v5, v3, :cond_5 goto :goto_3 :cond_5 const/4 v3, 0x0 const/4 v4, 0x4 const/16 v16, 0x0 move-object v0, v14 move-object/from16 v1, p2 move v2, v5 move/from16 v17, v5 move-object/from16 v5, v16 .line 43 invoke-static/range {v0 .. v5}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;IZILjava/lang/Object;)Z move-result v0 if-eqz v0, :cond_6 invoke-virtual/range {p2 .. p2}, Ljava/lang/String;->length()I move-result v0 add-int v5, v17, v0 const-string v0, "null cannot be cast to non-null type java.lang.String" invoke-static {v14, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v14, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String; move-result-object v15 const-string v0, "substring(...)" invoke-static {v15, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V :cond_6 :goto_3 if-eqz v15, :cond_8 .line 143 invoke-interface {v8, v15}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; if-nez v0, :cond_7 goto :goto_4 :cond_7 move-object v14, v0 :cond_8 :goto_4 if-eqz v14, :cond_9 .line 137 invoke-interface {v10, v14}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z :cond_9 move v0, v13 goto :goto_0 .line 152 :cond_a check-cast v10, Ljava/util/List; .line 127 move-object v11, v10 check-cast v11, Ljava/lang/Iterable; .line 153 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0, v7}, Ljava/lang/StringBuilder;->(I)V move-object v12, v0 check-cast v12, Ljava/lang/Appendable; const-string v0, "\n" move-object v13, v0 check-cast v13, Ljava/lang/CharSequence; const/4 v14, 0x0 const/4 v15, 0x0 const/16 v16, 0x0 const/16 v17, 0x0 const/16 v18, 0x0 const/16 v19, 0x7c const/16 v20, 0x0 invoke-static/range {v11 .. v20}, Lkotlin/collections/CollectionsKt;->joinTo$default(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Appendable; move-result-object v0 check-cast v0, Ljava/lang/StringBuilder; .line 154 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "toString(...)" .line 153 invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .line 35 :cond_b new-instance v0, Ljava/lang/IllegalArgumentException; const-string v1, "marginPrefix must be non-blank string." invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .end method .method public static synthetic replaceIndentByMargin$default(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; .locals 0 and-int/lit8 p4, p3, 0x1 if-eqz p4, :cond_0 const-string p1, "" :cond_0 and-int/lit8 p3, p3, 0x2 if-eqz p3, :cond_1 const-string p2, "|" .line 34 :cond_1 invoke-static {p0, p1, p2}, Lkotlin/text/StringsKt;->replaceIndentByMargin(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static final trimIndent(Ljava/lang/String;)Ljava/lang/String; .locals 1 const-string v0, "" invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "" .line 65 invoke-static {p0, v0}, Lkotlin/text/StringsKt;->replaceIndent(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static final trimMargin(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 1 const-string v0, "" invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "marginPrefix" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "" .line 27 invoke-static {p0, v0, p1}, Lkotlin/text/StringsKt;->replaceIndentByMargin(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public static synthetic trimMargin$default(Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; .locals 0 and-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_0 const-string p1, "|" .line 26 :cond_0 invoke-static {p0, p1}, Lkotlin/text/StringsKt;->trimMargin(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p0 return-object p0 .end method