If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Replace doesn't seem to work?

I have some code a bit like this:

Dim string1 as string
string1 = "some text"

Dim tempstr as string
tempstr = Replace(string1,"xt","ab")

string1 = tempstr

Now I believe string1 should be "some teab", but in fact it is unchanged.
What can be wrong?
I must add, that I haven't touched vb for more than 10 years, so I'm feeling my way into the syntax again...

Re: Replace doesn't seem to work?

Yep what you have shown would work, if that is your actual code then how are you checking string1 to see what the value is? If that is not the actual code then be sure to keep in mind that many string functions are case sensitive by default.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.