public replaceFirst(oldValue as Char, notnull newValue as String) as String
Replaces the first occurrence of a Unicode scalar with text.
| Parameter | Description |
|---|---|
oldValue | Scalar to replace. |
newValue | Replacement text, which may be empty. |
A new String; the receiver is unchanged.
assert "aba".replaceFirst('a', "xy") == "xyba"