mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 14:47:15 +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
|
||||
}
|
||||
|
||||
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(
|
||||
crossinline separatorFun: (I) -> R?,
|
||||
prefix: R?,
|
||||
postfix: R?,
|
||||
crossinline transform: (I) -> R?
|
||||
): 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