Returns a new
Text object who’s value is created by replacing all instances of the passed
what text with the passed
replacement text. If this
Text object does not contain the
what text then it returns a new
Text object who’s value is the same as the original’s. The original text is changed to the new value.
text.replace_all!(what as Text, replacement as Text) as Text
Textobject. The text you are searching for
Textobject. The replacement text to use for each found occurrence of
- A new
Textobject. The original text is changed to the same value as the return value
var a = "Go Go Gadget!" var b = a.replace_all!("Go", "Yo") print(a) # => "Yo Yo Gadget!" print(b) # => "Yo Yo Gadget!"