substring
fun String.substring(startIndex: Int): String
(Common source) (JVM source) (JS source) (Native source)
Returns a substring of this string that starts at the specified startIndex and continues to the end of the string.
fun String.substring(startIndex: Int, endIndex: Int): String
(Common source) (JVM source) (JS source) (Native source)
Returns the substring of this string starting at the startIndex and ending right before the endIndex.
Parameters
Returns a substring specified by the given range of indices.
Returns a substring of chars from a range of this char sequence starting at the startIndex and ending right before the endIndex.
Parameters
startIndex
- the start index (inclusive).
endIndex
- the end index (exclusive). If not specified, the length of the char sequence is used.