See Original text in context
multi method replace-with(Match: Str() --> Str)
Returns the invocant string where the Match
object is replaced by $replacement
.
my Str = "Some foo";my Match = .match(/foo/);my = .replace-with("string"); # «Some string»