
June 19th, 2003, 03:08 PM
|
|
Junior Member
|
|
Join Date: Jun 2003
Posts: 7
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Replacing a char
I am trying t o replace just one char in a string. However, when I try to use the Replace function in the below context (newTimeStamp being 20-something characters long):
newTimeStamp = Replace(newTimeStamp, "5", " ",4,1)
It truncates my string by 8 characters!
For example, if newTimeStamp was ="123456789" then the result would be "4 6789"
Does anyone know why it is doing is this? And, just as importantly, how to get it not to?
I know I could Mid the first 3 digits and splice the two strings together, but I'd assume that there is a way to just replace the culprit char and save the rest of the string!
Help!
|