diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt index 5ac1b0e6dd2..7d8b9c1b6de 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt @@ -179,6 +179,8 @@ public actual class Regex internal constructor(internal val nativePattern: Patte * Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex]. * * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence. + * + * @sample samples.text.Regexps.findAll */ @Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS") actual fun findAll(input: CharSequence, startIndex: Int = 0): Sequence { diff --git a/libraries/stdlib/common/src/kotlin/TextH.kt b/libraries/stdlib/common/src/kotlin/TextH.kt index 7cc34a8e326..4f0741037b1 100644 --- a/libraries/stdlib/common/src/kotlin/TextH.kt +++ b/libraries/stdlib/common/src/kotlin/TextH.kt @@ -33,6 +33,8 @@ expect class Regex { /** * Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex]. * + * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence. + * * @sample samples.text.Regexps.findAll */ fun findAll(input: CharSequence, startIndex: Int = 0): Sequence