Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Side by Side Diff: recipes/test/core/strings/using_raw_strings_test.dart

Issue 12335109: Strings recipes for the Dart Cookbook (Closed) Base URL: https://github.com/dart-lang/cookbook.git@master
Patch Set: Made most changes requested my Kathy. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « recipes/test/core/strings/substituting_strings_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 library using_raw_strings_test;
2
3 import 'package:unittest/unittest.dart';
4
5 void main() {
6 var x = "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfa sdfasdfasdfasdf";
7 var y = "\u0061sdf";
8 var z = "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfa sdfasdfasdfasdf";
9 print(x == z);
10 print(identical(x, z));
11 print("$x, $z");
12 return;
13
14 var string = '+1,';
15 var r = r'(\+|-)?\d+';
16 var r2 = '(\+|-)?\d+';
17 print("r = $r");
18 print("r2 = $r2");
19 print('When properly escaped: ' r'(\\+|-)?\\d+');
20 var regExp = new RegExp(r);
21
22 print(regExp.firstMatch(string).group(0));
23 print(3.0 == 3.0000);
24 }
OLDNEW
« no previous file with comments | « recipes/test/core/strings/substituting_strings_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698