Added Int.indices extension property.

This commit is contained in:
Evgeny Gerashchenko
2012-07-31 20:53:43 +04:00
parent 69313ae3be
commit 5667e76f4f
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -13,6 +13,9 @@ val Collection<*>.empty : Boolean
val Collection<*>.indices : IntRange
get() = 0..size-1
val Int.indices: IntRange
get() = 0..this-1
/**
* Converts the collection to an array
*/