From f6a06ee8ea92a2c9f1cca6ce3643fc604919ee68 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 2 Sep 2021 14:33:35 +0600 Subject: [PATCH] small addition to joinTo --- .../commonMain/kotlin/dev/inmo/micro_utils/common/JoinTo.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/JoinTo.kt b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/JoinTo.kt index 97845e14823..e6919928160 100644 --- a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/JoinTo.kt +++ b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/JoinTo.kt @@ -39,15 +39,15 @@ inline fun Iterable.joinTo( ): List = joinTo(separatorFun, prefix, postfix) { it } inline fun Iterable.joinTo( - separator: I?, + separator: I? = null, prefix: I? = null, postfix: I? = null ): List = joinTo({ separator }, prefix, postfix) inline fun Array.joinTo( crossinline separatorFun: (I) -> R?, - prefix: R?, - postfix: R?, + prefix: R? = null, + postfix: R? = null, crossinline transform: (I) -> R? ): Array = asIterable().joinTo(separatorFun, prefix, postfix, transform).toTypedArray()