mirror of
				https://github.com/InsanusMokrassar/MicroUtils.git
				synced 2025-11-04 06:00:22 +00:00 
			
		
		
		
	small addition to joinTo
This commit is contained in:
		@@ -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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user