OLD | NEW |
1 library java.engine; | 1 library java.engine; |
2 | 2 |
3 class StringUtilities { | 3 class StringUtilities { |
4 static List<String> EMPTY_ARRAY = new List(0); | 4 static const String EMPTY = ''; |
| 5 static const List<String> EMPTY_ARRAY = const <String> []; |
5 static String intern(String s) => s; | 6 static String intern(String s) => s; |
6 static String substringBefore(String str, String separator) { | 7 static String substringBefore(String str, String separator) { |
7 if (str == null || str.isEmpty) { | 8 if (str == null || str.isEmpty) { |
8 return str; | 9 return str; |
9 } | 10 } |
10 int pos = str.indexOf(separator); | 11 int pos = str.indexOf(separator); |
11 if (pos < 0) { | 12 if (pos < 0) { |
12 return str; | 13 return str; |
13 } | 14 } |
14 return str.substring(0, pos); | 15 return str.substring(0, pos); |
(...skipping 21 matching lines...) Expand all Loading... |
36 } | 37 } |
37 } | 38 } |
38 | 39 |
39 class UUID { | 40 class UUID { |
40 static int __nextId = 0; | 41 static int __nextId = 0; |
41 final String id; | 42 final String id; |
42 UUID(this.id); | 43 UUID(this.id); |
43 String toString() => id; | 44 String toString() => id; |
44 static UUID randomUUID() => new UUID((__nextId).toString()); | 45 static UUID randomUUID() => new UUID((__nextId).toString()); |
45 } | 46 } |
OLD | NEW |