Case transformations in strings

Brendan Eich brendan at
Thu Mar 5 23:34:48 PST 2009

On Mar 5, 2009, at 10:20 PM, Allen Wirfs-Brock wrote:
> The NOTE following toUpperCase ( says:
> Because both toUpperCase and toLowerCase have context-sensitive  
> behaviour, the functions are not symmetrical. In other words,  
> s.toUpperCase().toLowerCase() is not necessarily equal to  
> s.toLowerCase().
> This text is a carry over from ES3 and would seem to imply that  
> context sensitive processing is expected.

IIRC this is merely about characters such as Turkish dotless-I:

js> s = "\u0131"
js> s.toUpperCase()
js> s.toUpperCase().charCodeAt(0)
js> s.toUpperCase().toLowerCase()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Es-discuss mailing list