Mengbillar
Programmer
I have a slight speed problem. I have one veeery long string, and one single character which occurs quite often in it. now i want to get these chars out. i used this piece of code:
Do Until InStr(1, temp, "#" = 1
temp2 = temp2 + Chr(Val(Mid(temp, 1, InStr(1, temp, "#" - 1)))
temp = Mid(temp, InStr(1, temp, "#" + 1, Len(temp) - InStr(1, temp, "#")
Loop
In fact, the # is seperating ascii codes which all together form a string being recovered here, where temp2 holds the final string, and temp the one with ascii and strings. problem is that this code takes ages to run thru even if the length of temp is 'only' 200000 characters, which is rather small. any ideas how to speed this up, any faster alternatives available?
Do Until InStr(1, temp, "#" = 1
temp2 = temp2 + Chr(Val(Mid(temp, 1, InStr(1, temp, "#" - 1)))
temp = Mid(temp, InStr(1, temp, "#" + 1, Len(temp) - InStr(1, temp, "#")
Loop
In fact, the # is seperating ascii codes which all together form a string being recovered here, where temp2 holds the final string, and temp the one with ascii and strings. problem is that this code takes ages to run thru even if the length of temp is 'only' 200000 characters, which is rather small. any ideas how to speed this up, any faster alternatives available?