Fix small mistake in CharSequence.lastIndexOf documentation
This commit is contained in:
@@ -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 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`.
|
* @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 {
|
public fun CharSequence.lastIndexOf(char: Char, startIndex: Int = lastIndex, ignoreCase: Boolean = false): Int {
|
||||||
return if (ignoreCase || this !is String)
|
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 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`.
|
* @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 {
|
public fun CharSequence.lastIndexOf(string: String, startIndex: Int = lastIndex, ignoreCase: Boolean = false): Int {
|
||||||
return if (ignoreCase || this !is String)
|
return if (ignoreCase || this !is String)
|
||||||
|
|||||||
Reference in New Issue
Block a user