mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-23 02:28:47 +00:00
small addition to joinTo
This commit is contained in:
parent
2644f27975
commit
f6a06ee8ea
@ -39,15 +39,15 @@ inline fun <I> Iterable<I>.joinTo(
|
|||||||
): List<I> = joinTo<I, I>(separatorFun, prefix, postfix) { it }
|
): List<I> = joinTo<I, I>(separatorFun, prefix, postfix) { it }
|
||||||
|
|
||||||
inline fun <I> Iterable<I>.joinTo(
|
inline fun <I> Iterable<I>.joinTo(
|
||||||
separator: I?,
|
separator: I? = null,
|
||||||
prefix: I? = null,
|
prefix: I? = null,
|
||||||
postfix: I? = null
|
postfix: I? = null
|
||||||
): List<I> = joinTo<I>({ separator }, prefix, postfix)
|
): List<I> = joinTo<I>({ separator }, prefix, postfix)
|
||||||
|
|
||||||
inline fun <I, reified R> Array<I>.joinTo(
|
inline fun <I, reified R> Array<I>.joinTo(
|
||||||
crossinline separatorFun: (I) -> R?,
|
crossinline separatorFun: (I) -> R?,
|
||||||
prefix: R?,
|
prefix: R? = null,
|
||||||
postfix: R?,
|
postfix: R? = null,
|
||||||
crossinline transform: (I) -> R?
|
crossinline transform: (I) -> R?
|
||||||
): Array<R> = asIterable().joinTo(separatorFun, prefix, postfix, transform).toTypedArray()
|
): Array<R> = asIterable().joinTo(separatorFun, prefix, postfix, transform).toTypedArray()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user