[K/N] Commonize String.regionMatches function
As a part of efforts to stabilize K/N stdlib.
This commit is contained in:
committed by
Space Team
parent
0d31b0d12c
commit
7eba68e62b
@@ -311,6 +311,22 @@ expect fun CharSequence.regionMatches(
|
||||
ignoreCase: Boolean = false
|
||||
): Boolean
|
||||
|
||||
/**
|
||||
* Returns `true` if the specified range in this string is equal to the specified range in another string.
|
||||
* @param thisOffset the start offset in this string of the substring to compare.
|
||||
* @param other the string against a substring of which the comparison is performed.
|
||||
* @param otherOffset the start offset in the other string of the substring to compare.
|
||||
* @param length the length of the substring to compare.
|
||||
*/
|
||||
@SinceKotlin("1.9")
|
||||
public expect fun String.regionMatches(
|
||||
thisOffset: Int,
|
||||
other: String,
|
||||
otherOffset: Int,
|
||||
length: Int,
|
||||
ignoreCase: Boolean = false
|
||||
): Boolean
|
||||
|
||||
|
||||
/**
|
||||
* A Comparator that orders strings ignoring character case.
|
||||
|
||||
Reference in New Issue
Block a user