string.replace

BlitzMax Forums/BlitzMax Beginners Area/string.replace

amonite(Posted 2007) [#1]
Hello,

i don't understand my the following code does not do what it is supposed to do.

SuperStrict 

Local myString:String = "Benoit loves english pickles"

Print myString 

myString.replace("e","i")

Print myString 


Any idea ?

edit: i have just sync mods with blitzmax version 1.24


Jake L.(Posted 2007) [#2]
Hi,

replace like contains(), find() etc... returns a value, so you have to use it:

myString=myString.replace("e","i")



amonite(Posted 2007) [#3]
Thanks Jake L !