Add CharSequence.subSequence

This is done primarily for JVM interoperability, otherwise it's impossible to
inherit from CharSequence there. On JS subSequence at the moment just invokes
substring.

 #KT-5956 Fixed
This commit is contained in:
Alexander Udalov
2014-11-27 16:02:41 +03:00
parent 4d95bcfc7e
commit 8dae1b62dd
14 changed files with 64 additions and 21 deletions
+2
View File
@@ -296,6 +296,7 @@ public final class CharRange : kotlin.Range<kotlin.Char>, kotlin.Progression<kot
public trait CharSequence {
public abstract fun charAt(/*0*/ index: kotlin.Int): kotlin.Char
public abstract fun length(): kotlin.Int
public abstract fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
}
public trait Cloneable {
@@ -1433,6 +1434,7 @@ public final class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequenc
public final fun get(/*0*/ index: kotlin.Int): kotlin.Char
public open override /*1*/ fun length(): kotlin.Int
public final fun plus(/*0*/ other: kotlin.Any?): kotlin.String
public open override /*1*/ fun subSequence(/*0*/ start: kotlin.Int, /*1*/ end: kotlin.Int): kotlin.CharSequence
}
public open class Throwable {