RosettaCodeData/Task/String-interpolation--included-/Icon/string-interpolation--included-.icon
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

5 lines
289 B
Text

s2 := "humongous"
s3 := "little"
s1 := "Mary had a humongous lamb."
s1 ?:= tab(find(s2)) || (=s2,s3) || tab(0) # replaces the first instance of s2 with s3
while s1 ?:= tab(find(s2)) || (=s2,s3) || tab(0) # replaces all instances of s2 with s3, equivalent to replace