public replaceFirst(notnull oldValue as String, newValue as Char) as String
Replaces the first text occurrence with one scalar.
| Parameter | Description |
|---|---|
oldValue | Text to replace. |
newValue | Replacement scalar. |
A new String; the receiver is unchanged.
assert "abab".replaceFirst("ab", 'z') == "zab"