scala-js/scala-js — pull request #1182 by sjrd (2014-10-19 19:53:56+00:00)
Title: Implement String methods in an object rather than as a trait.

This fixes the mess that `RuntimeString` was as a trait. It was very hacky and very dependent on the implementation details.

Now, `RuntimeString` is only an object, and its methods take an explicit `thiz` parameter that stands for the String being operated on.

Most methods are inlineable one-liners. For the others, Closure turn them into static methods anyway.