Re: ES3.1 Draft: String generics

2008-05-07 Thread Erik Arvidsson
Mike, We are saying the same thing. Maybe it is my escaping that is confusing you. Mine also has the length 6. My example is using a JS string literal where yours does not. On Wed, May 7, 2008 at 10:12, Mike Shaver <[EMAIL PROTECTED]> wrote: > On Wed, May 7, 2008 at 12:17 PM, Erik Arvidsson >

Re: ES3.1 Draft: String generics

2008-05-07 Thread Mike Shaver
On Wed, May 7, 2008 at 12:17 PM, Erik Arvidsson <[EMAIL PROTECTED]> wrote: > The quote method needs more specification. It needs to escape a lot > more characters than just single and double quotes. The basic rule is > that String.prototype.quote should return a string that would be a > valid

Re: ES3.1 Draft: String generics

2008-05-07 Thread Erik Arvidsson
The quote method needs more specification. It needs to escape a lot more characters than just single and double quotes. The basic rule is that String.prototype.quote should return a string that would be a valid string literal for that string. For example: "a\nb".quote() => "\"a\\nb\"" One othe

Re: ES3.1 Draft: String generics

2008-05-07 Thread Douglas Crockford
We should nail down the meaning of /\s/. Should it be the minimum (IE) or the maximum (Opera)? Pratap Lakshman (VJ#SDK) wrote: > I have uploaded to the wiki a draft proposal >

ES3.1 Draft: String generics

2008-05-07 Thread Pratap Lakshman (VJ#SDK)
I have uploaded to the wiki a draft proposal to add a couple of generics to the String object. In order to retain the subset relationship with pro