R.Wieser
2017-01-03 12:40:05 UTC
Hello All,
I need to remove, in a string, a number of characters between two points.
Currently I'm dong that with
sText = left(sText, RangeBegin-1) & mid(sText, RangeEnd+1)
, but as I have to do that quite a few times in a rather large string (1
MByte) the whole thing gets mighty slow (probably because of the
again-and-again recreation of the string).
So, I'm looking for a more economical (read: faster) way to do the same.
The problem is that VBScript doesn't do simple overwriting, and the
"replace" command does not accept a start position -- or rather it does, but
that one throws everything away before that point, making it useless to me.
:-\
Does anyone have an idea how to do it ?
Regards,
Rudy Wieser
I need to remove, in a string, a number of characters between two points.
Currently I'm dong that with
sText = left(sText, RangeBegin-1) & mid(sText, RangeEnd+1)
, but as I have to do that quite a few times in a rather large string (1
MByte) the whole thing gets mighty slow (probably because of the
again-and-again recreation of the string).
So, I'm looking for a more economical (read: faster) way to do the same.
The problem is that VBScript doesn't do simple overwriting, and the
"replace" command does not accept a start position -- or rather it does, but
that one throws everything away before that point, making it useless to me.
:-\
Does anyone have an idea how to do it ?
Regards,
Rudy Wieser