Chromium Code Reviews| Index: frog/lib/string_implementation.dart |
| diff --git a/frog/lib/string_implementation.dart b/frog/lib/string_implementation.dart |
| index d8975a52f1bd606098256f09aada071febdd7022..4ad3f531f5a1a2e52d6e35e212a72e88b23e44db 100644 |
| --- a/frog/lib/string_implementation.dart |
| +++ b/frog/lib/string_implementation.dart |
| @@ -48,6 +48,7 @@ class StringImplementation implements String native "String" { |
| String replaceAll(Pattern from, String to) native @""" |
| if (typeof(from) == 'string' || from instanceof String) { |
| from = new RegExp(from.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'g'); |
| + to = to.replace(/\$/g, '$$$$'); // Escape sequences are fun! |
|
jimhug
2011/12/14 22:14:47
I wanted to suggest that you use @'$$' to simplify
|
| } |
| return this.replace(from, to);"""; |