Fast byte replacement on string

A

Andrew Barringer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top