Hi all,
I have seen the msdn documentation on slice() or splice() methods but cannot get them to work, and always fall back on performing multiple instanced of split()
So I would like confirmation that these methods work in JScript.
My emmediate problem may not involve the above. I have a URL containing valuable data, currently extracted with split() and I'm hoping someone will recommend a more efficient solution.
var uri = '?file=23%dblurb'
Fortunately, there's only one = and it appears the value is always followed by a %.
uri = uri.split('=');
uri = uri[1].split('%');
uri = uri[0];
The reason I don't like this is because some of those URLs are 100 or more characters in length, many of those characters are % and there may be hundreds if not thousands of URLs to parse. The current solution feels innefficient
I don't want to bog JScript down. Any suggestions?
----------
I'm willing to trade custom scripts for... [see profile]
I have seen the msdn documentation on slice() or splice() methods but cannot get them to work, and always fall back on performing multiple instanced of split()

So I would like confirmation that these methods work in JScript.
My emmediate problem may not involve the above. I have a URL containing valuable data, currently extracted with split() and I'm hoping someone will recommend a more efficient solution.
var uri = '?file=23%dblurb'
Fortunately, there's only one = and it appears the value is always followed by a %.
uri = uri.split('=');
uri = uri[1].split('%');
uri = uri[0];
The reason I don't like this is because some of those URLs are 100 or more characters in length, many of those characters are % and there may be hundreds if not thousands of URLs to parse. The current solution feels innefficient

I don't want to bog JScript down. Any suggestions?

----------
I'm willing to trade custom scripts for... [see profile]