substring

expect fun substring(startIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4

Throws

if startIndex is less than zero or greater than the length of this string builder.


expect fun substring(startIndex: Int, endIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.4

Throws

or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.

actual fun substring(startIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4

Throws

if startIndex is less than zero or greater than the length of this string builder.


actual fun substring(startIndex: Int, endIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.4

Throws

or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.

actual fun substring(startIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.4

Throws

if startIndex is less than zero or greater than the length of this string builder.


actual fun substring(startIndex: Int, endIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.3

Throws

or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.

actual fun substring(startIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.8

Throws

if startIndex is less than zero or greater than the length of this string builder.


actual fun substring(startIndex: Int, endIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.8

Throws

or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.

actual fun substring(startIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the length (exclusive).

Since Kotlin

1.8

Throws

if startIndex is less than zero or greater than the length of this string builder.


actual fun substring(startIndex: Int, endIndex: Int): String(source)

Returns a new String that contains characters in this string builder at startIndex (inclusive) and up to the endIndex (exclusive).

Since Kotlin

1.8

Throws

or IllegalArgumentException when startIndex or endIndex is out of range of this string builder indices or when startIndex > endIndex.