package kotlin.text; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; /* loaded from: classes5.dex */ public abstract class StringsKt__AppendableKt { public static void appendElement(Appendable appendable, Object obj, Function1 function1) { Intrinsics.checkNotNullParameter(appendable, ""); if (function1 != null) { appendable.append((CharSequence) function1.invoke(obj)); return; } if (obj == null || (obj instanceof CharSequence)) { appendable.append((CharSequence) obj); } else if (obj instanceof Character) { appendable.append(((Character) obj).charValue()); } else { appendable.append(String.valueOf(obj)); } } }