klyn.String.replaceLast
method
public replaceLast(notnull oldValue as String, newValue as Char) as String
Description

Replaces the last text occurrence with one scalar.

Parameters
ParameterDescription
oldValueText to replace.
newValueReplacement scalar.
Returns

A new String; the receiver is unchanged.

Example

assert "abab".replaceLast("ab", 'z') == "abz"