Chromium Code Reviews| Index: compiler/lib/implementation/string.dart |
| =================================================================== |
| --- compiler/lib/implementation/string.dart (revision 400) |
| +++ compiler/lib/implementation/string.dart (working copy) |
| @@ -145,7 +145,8 @@ |
| while (ix < str.length) { |
| int foundIx = str.indexOf(this, ix); |
| if (foundIx < 0) break; |
| - result.add(new _StringMatch(foundIx, str, this)); |
| + // call "toString" to coerse the "this" back to a primitive string |
|
floitsch
2011/10/14 20:20:44
Call ... coerce ... string. (finish with dot).
John Lenz
2011/10/14 21:26:40
Done.
|
| + result.add(new _StringMatch(foundIx, str, this.toString())); |
| ix = foundIx + length; |
| } |
| return result; |
| @@ -184,6 +185,8 @@ |
| String _replace(Pattern from, String to) native; |
| String _replaceAll(Pattern from, String to) native; |
| Array<String> _split(Pattern pattern) native; |
| + |
| + get dynamic() { return toString(); } |
| } |
| class _StringJsUtil { |