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

Replaces the first text occurrence with one scalar.

Parameters
ParameterDescription
oldValueText to replace.
newValueReplacement scalar.
Returns

A new String; the receiver is unchanged.

Example

assert "abab".replaceFirst("ab", 'z') == "zab"