From 2155f1680f3ae19746c136858aab6c00211e2817 Mon Sep 17 00:00:00 2001 From: Abduqodiri Qurbonzoda Date: Tue, 29 Oct 2019 00:10:27 +0300 Subject: [PATCH] Fix small mistake in CharSequence.lastIndexOf documentation --- libraries/stdlib/src/kotlin/text/Strings.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/stdlib/src/kotlin/text/Strings.kt b/libraries/stdlib/src/kotlin/text/Strings.kt index d473a52143a..e82b9002dcd 100644 --- a/libraries/stdlib/src/kotlin/text/Strings.kt +++ b/libraries/stdlib/src/kotlin/text/Strings.kt @@ -1013,7 +1013,7 @@ public fun CharSequence.indexOf(string: String, startIndex: Int = 0, ignoreCase: * * @param startIndex The index of character to start searching at. The search proceeds backward toward the beginning of the string. * @param ignoreCase `true` to ignore character case when matching a character. By default `false`. - * @return An index of the first occurrence of [char] or -1 if none is found. + * @return An index of the last occurrence of [char] or -1 if none is found. */ public fun CharSequence.lastIndexOf(char: Char, startIndex: Int = lastIndex, ignoreCase: Boolean = false): Int { return if (ignoreCase || this !is String) @@ -1028,7 +1028,7 @@ public fun CharSequence.lastIndexOf(char: Char, startIndex: Int = lastIndex, ign * * @param startIndex The index of character to start searching at. The search proceeds backward toward the beginning of the string. * @param ignoreCase `true` to ignore character case when matching a string. By default `false`. - * @return An index of the first occurrence of [string] or -1 if none is found. + * @return An index of the last occurrence of [string] or -1 if none is found. */ public fun CharSequence.lastIndexOf(string: String, startIndex: Int = lastIndex, ignoreCase: Boolean = false): Int { return if (ignoreCase || this !is String)