[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Fast byte replacement on string

Andrew Barringer

2/26/2009 5:47:00 PM

I'm implementing a requirement for a Google service that reads in part

=20

With urls..

=20

"To start, repeatedly URL-unescape the URL until it has no more
hex-encodings."

=20

Do lots of stuff here with url.

=20

Finally "After performing these steps, percent-escape all characters in
the URL which are <=3D ASCII 32, >=3D 127, or "%". The escapes should =
use
uppercase hex characters."

=20

Do any of you have a very fast way to do this?

=20

The implementation I have now is dreadfully slow, I'll spare you my
solution. J =20

=20

I need a solution that will work with Ruby 1.8.6 & 1.9.1

=20

Andy

=20