string.replace

BlitzMax Forums/BlitzMax Beginners Area/string.replace

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

Hi,

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

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


Thanks Jake L !