OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 | 6 |
7 main() { | 7 main() { |
8 testSplitString(); | 8 testSplitString(); |
9 testSplitRegExp(); | 9 testSplitRegExp(); |
10 testSplitPattern(); | 10 testSplitPattern(); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 final regexp; | 126 final regexp; |
127 RegExpWrap(String source) : regexp = new RegExp(source); | 127 RegExpWrap(String source) : regexp = new RegExp(source); |
128 Iterable<Match> allMatches(String string, [int start = 0]) => | 128 Iterable<Match> allMatches(String string, [int start = 0]) => |
129 regexp.allMatches(string, start); | 129 regexp.allMatches(string, start); |
130 | 130 |
131 Match matchAsPrefix(String string, [int start = 0]) => | 131 Match matchAsPrefix(String string, [int start = 0]) => |
132 regexp.matchAsPrefix(string, start); | 132 regexp.matchAsPrefix(string, start); |
133 | 133 |
134 String toString() => "Wrap(/${regexp.pattern}/)"; | 134 String toString() => "Wrap(/${regexp.pattern}/)"; |
135 } | 135 } |
OLD | NEW |