replaceFirst
Replaces the first occurrence of the given regular expression regex in this char sequence with specified replacement expression.
Since Kotlin
1.0Parameters
A replacement expression that can include substitutions. See Regex.replaceFirst for details.
Returns a new string with the first occurrence of oldChar replaced with newChar.
Since Kotlin
1.0Returns a new string obtained by replacing the first occurrence of the oldValue substring in this string with the specified newValue string.
Since Kotlin
1.0Since Kotlin
1.1Returns a new string with the first occurrence of oldChar replaced with newChar.
Since Kotlin
1.0Returns a new string obtained by replacing the first occurrence of the oldValue substring in this string with the specified newValue string.
Since Kotlin
1.0Returns a new string with the first occurrence of oldChar replaced with newChar.
Since Kotlin
1.3Returns a new string obtained by replacing the first occurrence of the oldValue substring in this string with the specified newValue string.
Since Kotlin
1.3Returns a new string with the first occurrence of oldChar replaced with newChar.
Since Kotlin
1.8Returns a new string obtained by replacing the first occurrence of the oldValue substring in this string with the specified newValue string.
Since Kotlin
1.8Returns a new string with the first occurrence of oldChar replaced with newChar.
Since Kotlin
1.8Returns a new string obtained by replacing the first occurrence of the oldValue substring in this string with the specified newValue string.