kotlin.text.replaceFirst

replaceFirst

inline 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.

Parameters

replacement - A replacement