public native replaceFirst(oldValue as String, newValue as String) as String
Returns a copy where the first occurrence of oldValue is replaced by newValue.
| Parameter | Description |
|---|---|
oldValue | Value to replace. |
newValue | Replacement value. |
A new string with the replacement applied.
assert "a-b-a".replaceFirst("a", "x") == "x-b-a"