Provide asIterable also for CharSequences, Maps and Iterables.

KT-10152 Fixed
This commit is contained in:
Ilya Gorbunov
2015-11-29 05:04:31 +03:00
parent 45db5db7e8
commit f596d9ac23
8 changed files with 145 additions and 103 deletions
@@ -1761,6 +1761,13 @@ public fun <T> Iterable<T>.joinToString(separator: String = ", ", prefix: String
return joinTo(StringBuilder(), separator, prefix, postfix, limit, truncated, transform).toString()
}
/**
* Returns this collection as an [Iterable].
*/
public fun <T> Iterable<T>.asIterable(): Iterable<T> {
return this
}
/**
* Returns a sequence from the given collection.
*/