mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-17 13:53:49 +00:00
small addition to joinTo
This commit is contained in:
parent
662f4d22a3
commit
97fc1d6239
@ -25,9 +25,23 @@ inline fun <I, R> Iterable<I>.joinTo(
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun <I, R> Iterable<I>.joinTo(
|
||||||
|
separator: R?,
|
||||||
|
prefix: R?,
|
||||||
|
postfix: R?,
|
||||||
|
crossinline transform: (I) -> R?
|
||||||
|
): List<R> = joinTo({ separator }, prefix, postfix, transform)
|
||||||
|
|
||||||
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?,
|
||||||
postfix: R?,
|
postfix: R?,
|
||||||
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()
|
||||||
|
|
||||||
|
inline fun <I, reified R> Array<I>.joinTo(
|
||||||
|
separator: R?,
|
||||||
|
prefix: R?,
|
||||||
|
postfix: R?,
|
||||||
|
crossinline transform: (I) -> R?
|
||||||
|
): Array<R> = asIterable().joinTo(separator, prefix, postfix, transform).toTypedArray()
|
||||||
|
Loading…
Reference in New Issue
Block a user