Skip to content

replace_first

In std/string.

fn replace_first(self, from: String, to: String) : String

self with the first occurrence of from replaced by to: "aaa" | replace_first("a", "b") is "baa".