Implement String to/from CharArray conversion (KT-29265)

This commit is contained in:
Abduqodiri Qurbonzoda
2019-04-11 02:57:33 +03:00
parent a3247b1b92
commit 81d2d3cb6a
12 changed files with 169 additions and 14 deletions
@@ -123,6 +123,15 @@ public abstract class AbstractList<out E> protected constructor() : AbstractColl
}
}
internal fun checkBoundsIndexes(startIndex: Int, endIndex: Int, size: Int) {
if (startIndex < 0 || endIndex > size) {
throw IndexOutOfBoundsException("startIndex: $startIndex, endIndex: $endIndex, size: $size")
}
if (startIndex > endIndex) {
throw IllegalArgumentException("startIndex: $startIndex > endIndex: $endIndex")
}
}
internal fun orderedHashCode(c: Collection<*>): Int {
var hashCode = 1
for (e in c) {