klyn.String.replace
method
public native replace(oldValue as String, newValue as String) as String
Description

Returns a copy where all occurrences of oldValue are replaced by newValue.

Parameters
  • oldValue Value to replace.
  • newValue Replacement value.
Returns

A new string with the replacements applied.

Example
assert "a-b-a".replace("a", "x") == "x-b-x"