Fix small mistake in CharSequence.lastIndexOf documentation

This commit is contained in:
Abduqodiri Qurbonzoda
2019-10-29 00:10:27 +03:00
parent 4a0f683bea
commit 2155f1680f
+2 -2
View File
@@ -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)