replace First
inline fun CharSequence.replaceFirst(regex: Regex, replacement: String): String
Content copied to clipboard
Replaces the first occurrence of the given regular expression regex in this char sequence with specified replacement expression.
Parameters
replacement
A replacement expression that can include substitutions. See Regex.replaceFirst for details.
fun String.replaceFirst(oldChar: Char, newChar: Char, ignoreCase: Boolean = false): String
Content copied to clipboard
fun String.replaceFirst(oldValue: String, newValue: String, ignoreCase: Boolean = false): String
Content copied to clipboard