For Programmers: Free Programming Magazines  


Home > Archive > AWK > January 2005 > A better way?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author A better way?
Ian Stirling

2005-01-07, 3:56 pm


IGNORECASE=0
while(match(name,"%(([0-9A-F][a-f])|([a-f][0-9A-F])|([a-f][a-f]))"))
{
name=substr(name,1,RSTART-1) toupper(substr(name,RSTART,RLENGTH)) substr(name,RSTART+3)
}
IGNORECASE=1

I can't help feeling that this is a clumsy way of doing things.

It's basically for converting URLs that have hex encoded URLs to the proper
form, which is all uppercase, from ones that may be lowercase.
Is there a better solution?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com