class Destructured
Provides components for destructuring assignment of group values.
component1 corresponds to the value of the first group, component2 — of the second, and so on.
If the group in the regular expression is optional and there were no match captured by that group, corresponding component value is an empty string.
fun main(args: Array<String>) {
//sampleStart
//Missing function name in @sample
//sampleEnd
}
val match: MatchResult |
operator fun component1(): String | |
operator fun component10(): String | |
operator fun component2(): String | |
operator fun component3(): String | |
operator fun component4(): String | |
operator fun component5(): String | |
operator fun component6(): String | |
operator fun component7(): String | |
operator fun component8(): String | |
operator fun component9(): String | |
fun toList(): List<String> Returns destructured group values as a list of strings. First value in the returned list corresponds to the value of the first group, and so on. |
open operator fun equals(other: Any?): Boolean Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements: | |
open fun hashCode(): Int Returns a hash code value for the object. The general contract of hashCode is: | |
open fun toString(): String Returns a string representation of the object. |
© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-match-result/-destructured/index.html