Is Replace() broke?

BlitzMax Forums/BlitzMax Beginners Area/Is Replace() broke?

Chroma(Posted 2005) [#1]
This isn't working for me and I'm not sure why:

Local this:String = "hello there"

Replace(this,"hello","go")

Print this


edit Ugh...have to do a:

this = Replace( this,"hello","go" )



Zethrax(Posted 2005) [#2]
You might be better off using the string 'replace' method rather than the old retro string 'replace' function. Check out language > strings in the Blitzmax help.

eg.

Local t:String="***** HELLO *****"
Print t.Replace( "*","!" ) 'replaces all "*" with "!"


Chroma(Posted 2005) [#3]
Thx for the tip Bill.