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

Replaces the last occurrence of one Unicode scalar with another.

Parameters
ParameterDescription
oldValueScalar to replace.
newValueReplacement scalar.
Returns

A new String; the receiver is unchanged.

Example

assert "aba".replaceLast('a', 'z') == "abz"