fun String.replaceFirst( oldChar: Char, newChar: Char, ignoreCase: Boolean = false ): String
fun String.replaceFirst( oldChar: Char, newChar: Char, ignoreCase: Boolean ): String
fun String.replaceFirst( oldValue: String, newValue: String, ignoreCase: Boolean = false ): String
fun String.replaceFirst( oldValue: String, newValue: String, ignoreCase: Boolean ): String
fun CharSequence.replaceFirst( regex: Regex, replacement: String ): String
Replaces the first occurrence of the given regular expression regex in this char sequence with specified replacement expression.
replacement
- A replacement expression that can include substitutions. See Regex.replaceFirst for details.
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/replace-first.html