RosettaCodeData/Task/Literals-String/Phix/literals-string-4.phix
2016-12-05 23:44:36 +01:00

4 lines
183 B
Text

string s = "food"
s[2..3] = 'e' -- s is now "feed" (replace all)
s[2..2] = "east" -- s is now "feasted" (replace substring)
s[2..5] = "" -- s is now "fed"