Remove default values in actual functions that have default values in expect
Remove suppressions about default values in expect declarations
This commit is contained in:
@@ -76,11 +76,11 @@ public actual class Regex actual constructor(pattern: String, options: Set<Regex
|
||||
* @param startIndex An index to start search with, by default 0. Must be not less than zero and not greater than `input.length()`
|
||||
* @return An instance of [MatchResult] if match was found or `null` otherwise.
|
||||
*/
|
||||
public actual fun find(input: CharSequence, startIndex: Int = 0): MatchResult? = nativePattern.findNext(input.toString(), startIndex)
|
||||
public actual fun find(input: CharSequence, startIndex: Int /*= 0*/): MatchResult? = nativePattern.findNext(input.toString(), startIndex)
|
||||
|
||||
/** Returns a sequence of all occurrences of a regular expression within the [input] string, beginning at the specified [startIndex].
|
||||
*/
|
||||
public actual fun findAll(input: CharSequence, startIndex: Int = 0): Sequence<MatchResult> = generateSequence({ find(input, startIndex) }, { match -> match.next() })
|
||||
public actual fun findAll(input: CharSequence, startIndex: Int /*= 0*/): Sequence<MatchResult> = generateSequence({ find(input, startIndex) }, { match -> match.next() })
|
||||
|
||||
/**
|
||||
* Attempts to match the entire [input] CharSequence against the pattern.
|
||||
@@ -144,7 +144,7 @@ public actual class Regex actual constructor(pattern: String, options: Set<Regex
|
||||
*
|
||||
* @param limit The maximum number of times the split can occur.
|
||||
*/
|
||||
public actual fun split(input: CharSequence, limit: Int = 0): List<String> {
|
||||
public actual fun split(input: CharSequence, limit: Int /*= 0*/): List<String> {
|
||||
require(limit >= 0) { "Limit must be non-negative, but was $limit" }
|
||||
val matches = findAll(input).let { if (limit == 0) it else it.take(limit - 1) }
|
||||
val result = mutableListOf<String>()
|
||||
|
||||
@@ -46,7 +46,7 @@ public fun String.matches(regex: String): Boolean {
|
||||
|
||||
public actual fun CharSequence.isBlank(): Boolean = length == 0 || (if (this is String) this else this.toString()).matches("^[\\s\\xA0]+$")
|
||||
|
||||
public actual fun String?.equals(other: String?, ignoreCase: Boolean = false): Boolean =
|
||||
public actual fun String?.equals(other: String?, ignoreCase: Boolean /*= false*/): Boolean =
|
||||
if (this == null)
|
||||
other == null
|
||||
else if (!ignoreCase)
|
||||
@@ -55,7 +55,7 @@ public actual fun String?.equals(other: String?, ignoreCase: Boolean = false): B
|
||||
other != null && this.toLowerCase() == other.toLowerCase()
|
||||
|
||||
|
||||
public actual fun CharSequence.regionMatches(thisOffset: Int, other: CharSequence, otherOffset: Int, length: Int, ignoreCase: Boolean = false): Boolean
|
||||
public actual fun CharSequence.regionMatches(thisOffset: Int, other: CharSequence, otherOffset: Int, length: Int, ignoreCase: Boolean /*= false*/): Boolean
|
||||
= regionMatchesImpl(thisOffset, other, otherOffset, length, ignoreCase)
|
||||
|
||||
|
||||
@@ -107,14 +107,14 @@ public actual fun CharSequence.repeat(n: Int): String {
|
||||
}
|
||||
}
|
||||
|
||||
public actual fun String.replace(oldValue: String, newValue: String, ignoreCase: Boolean = false): String =
|
||||
public actual fun String.replace(oldValue: String, newValue: String, ignoreCase: Boolean /*= false*/): String =
|
||||
nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "gi" else "g"), Regex.escapeReplacement(newValue))
|
||||
|
||||
public actual fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String =
|
||||
public actual fun String.replace(oldChar: Char, newChar: Char, ignoreCase: Boolean /*= false*/): String =
|
||||
nativeReplace(RegExp(Regex.escape(oldChar.toString()), if (ignoreCase) "gi" else "g"), newChar.toString())
|
||||
|
||||
public actual fun String.replaceFirst(oldValue: String, newValue: String, ignoreCase: Boolean = false): String =
|
||||
public actual fun String.replaceFirst(oldValue: String, newValue: String, ignoreCase: Boolean /*= false*/): String =
|
||||
nativeReplace(RegExp(Regex.escape(oldValue), if (ignoreCase) "i" else ""), Regex.escapeReplacement(newValue))
|
||||
|
||||
public actual fun String.replaceFirst(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String =
|
||||
public actual fun String.replaceFirst(oldChar: Char, newChar: Char, ignoreCase: Boolean /*= false*/): String =
|
||||
nativeReplace(RegExp(Regex.escape(oldChar.toString()), if (ignoreCase) "i" else ""), newChar.toString())
|
||||
|
||||
Reference in New Issue
Block a user