In Pascal, this (or the variation posted later) would probably work moderately well. However, in VB, this type of string manipulation isn't quite as efficient, since VB allocates memory for strings very badly. Even using the Mid statement (not the function, the statement), something most VB programmers are less than fully familiar with, you will likely be allocating memory for string comparisons and the like, wasting FAR more time than you would actually save.
Your approach, while better in C/Pascal/Assembly, though it could be improved by manipulating the input string directly, would probably be less workable and less efficient in VB.
If you REALLY want to prove your point to everybody who has flamed you in this thread, write the procedure in VB, and give us time comparisons of a looped replace vs. your method.
Rob
Discussion on:
Message 19 of 35

































