Title says it all, but basically I want something like:
1 | -- My script |
2 | text = "I love bananas very much!" |
3 | -- And then have some code that changes "bananas" to "apples" |
4 | print (text) --> So it will say "I love apples very much!" |
I'n not very good with string manipulation yet, so any help would be appreciated!
Thanks in advance, SebbyTheGODKid
I believe it involves using gsub
1 | local text = "I love bananas very much!" |
2 | text = string.gsub(text, "bananas" , "apples" ) |
3 | print (text) |