Andrus,
You probably still want to do a $ test so that you can get an early exit out of that loop, unless the strings you are decoding have a high incidence of every possible character in them. You might also want to do some analysis and check the frequency of occurance of each escaped character on average and use an array to store the order that would optimize the code a lot.
If you want zip up a couple of these huge url strings and email them to me I'll take a look and see if there's anything else that would help. I might even crank up the VC++ compiler and do this the right way *bg*.
>Sorry, I dont have C compiler and experiences to work with it.
>
>
>Maybe this vfp program is faster than previous code:
>
>
>for i=0 to 255
> cRes = strtran( cRes, '%'+left( TRANSFORM(i,'@0'),2), chr(i) )
> endfor
>