public replaceFirst(notnull oldValue as MutableString, notnull newValue as MutableString) as String
Returns an immutable String with substring replacements.
| Parameter | Description |
|---|---|
oldValue | Substring to replace. |
newValue | Replacement text. |
An immutable String result.
result = m"a-b-a".replaceFirst(m"a", m"x")