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 3cf7e328b7f..5ac1b0e6dd2 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/text/Regex.kt @@ -156,6 +156,7 @@ public actual class Regex internal constructor(internal val nativePattern: Patte * @param startIndex An index to start search with, by default 0. Must be not less than zero and not greater than `input.length()` * @return An instance of [MatchResult] if match was found or `null` otherwise. * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence. + * @sample samples.text.Regexps.find */ @Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS") actual fun find(input: CharSequence, startIndex: Int = 0): MatchResult? { diff --git a/libraries/stdlib/common/src/kotlin/TextH.kt b/libraries/stdlib/common/src/kotlin/TextH.kt index eedf5fb97a3..7cc34a8e326 100644 --- a/libraries/stdlib/common/src/kotlin/TextH.kt +++ b/libraries/stdlib/common/src/kotlin/TextH.kt @@ -25,6 +25,7 @@ expect class Regex { * * @param startIndex An index to start search with, by default 0. Must be not less than zero and not greater than `input.length()` * @return An instance of [MatchResult] if match was found or `null` otherwise. + * @throws IndexOutOfBoundsException if [startIndex] is less than zero or greater than the length of the [input] char sequence. * @sample samples.text.Regexps.find */ fun find(input: CharSequence, startIndex: Int = 0): MatchResult? diff --git a/libraries/stdlib/js/src/kotlin/text/regex.kt b/libraries/stdlib/js/src/kotlin/text/regex.kt index c5cd563217b..fcbba68fd59 100644 --- a/libraries/stdlib/js/src/kotlin/text/regex.kt +++ b/libraries/stdlib/js/src/kotlin/text/regex.kt @@ -66,11 +66,13 @@ public actual class Regex actual constructor(pattern: String, options: Set