RosettaCodeData/Task/String-interpolation-included-/Icon/string-interpolation-included-.icon
2023-07-01 13:44:08 -04: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