[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
@@ -649,7 +649,8 @@ public actual fun CharSequence.regionMatches(thisOffset: Int, other: CharSequenc
|
||||
* @param otherOffset the start offset in the other string of the substring to compare.
|
||||
* @param length the length of the substring to compare.
|
||||
*/
|
||||
public fun String.regionMatches(thisOffset: Int, other: String, otherOffset: Int, length: Int, ignoreCase: Boolean = false): Boolean =
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun String.regionMatches(thisOffset: Int, other: String, otherOffset: Int, length: Int, ignoreCase: Boolean = false): Boolean =
|
||||
if (!ignoreCase)
|
||||
(this as java.lang.String).regionMatches(thisOffset, other, otherOffset, length)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user