public replaceFirst(oldValue as Char, newValue as Char) as String
Replaces the first occurrence of one Unicode scalar with another.
| Parameter | Description |
|---|---|
oldValue | Scalar to replace. |
newValue | Replacement scalar. |
A new String; the receiver is unchanged.
assert "aba".replaceFirst('a', 'z') == "zba"