Make JS Regex.replace not inline #KT-27738
This commit is contained in:
committed by
Space
parent
91aa956f34
commit
407feb656e
@@ -1426,7 +1426,7 @@ public final class Regex {
|
|||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.ExperimentalStdlibApi
|
||||||
public final fun matchesAt(input: kotlin.CharSequence, index: kotlin.Int): kotlin.Boolean
|
public final fun matchesAt(input: kotlin.CharSequence, index: kotlin.Int): kotlin.Boolean
|
||||||
|
|
||||||
public final inline fun replace(input: kotlin.CharSequence, transform: (kotlin.text.MatchResult) -> kotlin.CharSequence): kotlin.String
|
public final fun replace(input: kotlin.CharSequence, transform: (kotlin.text.MatchResult) -> kotlin.CharSequence): kotlin.String
|
||||||
|
|
||||||
public final fun replace(input: kotlin.CharSequence, replacement: kotlin.String): kotlin.String
|
public final fun replace(input: kotlin.CharSequence, replacement: kotlin.String): kotlin.String
|
||||||
|
|
||||||
|
|||||||
@@ -1426,7 +1426,7 @@ public final class Regex {
|
|||||||
@kotlin.ExperimentalStdlibApi
|
@kotlin.ExperimentalStdlibApi
|
||||||
public final fun matchesAt(input: kotlin.CharSequence, index: kotlin.Int): kotlin.Boolean
|
public final fun matchesAt(input: kotlin.CharSequence, index: kotlin.Int): kotlin.Boolean
|
||||||
|
|
||||||
public final inline fun replace(input: kotlin.CharSequence, transform: (kotlin.text.MatchResult) -> kotlin.CharSequence): kotlin.String
|
public final fun replace(input: kotlin.CharSequence, transform: (kotlin.text.MatchResult) -> kotlin.CharSequence): kotlin.String
|
||||||
|
|
||||||
public final fun replace(input: kotlin.CharSequence, replacement: kotlin.String): kotlin.String
|
public final fun replace(input: kotlin.CharSequence, replacement: kotlin.String): kotlin.String
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public actual class Regex actual constructor(pattern: String, options: Set<Regex
|
|||||||
* the given function [transform] that takes [MatchResult] and returns a string to be used as a
|
* the given function [transform] that takes [MatchResult] and returns a string to be used as a
|
||||||
* replacement for that match.
|
* replacement for that match.
|
||||||
*/
|
*/
|
||||||
public actual inline fun replace(input: CharSequence, transform: (MatchResult) -> CharSequence): String {
|
public actual fun replace(input: CharSequence, transform: (MatchResult) -> CharSequence): String {
|
||||||
var match = find(input)
|
var match = find(input)
|
||||||
if (match == null) return input.toString()
|
if (match == null) return input.toString()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user