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

Replaces the first 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".replaceFirst('a', 'z') == "zba"