| 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 part of dart._collection.dev; | 5 part of dart._collection.dev; |
| 6 | 6 |
| 7 | 7 |
| 8 // This is a hack to make @deprecated work in dart:io. Don't remove or use this, | 8 // This is a hack to make @deprecated work in dart:io. Don't remove or use this, |
| 9 // unless coordinated with either me or the core library team. Thanks! | 9 // unless coordinated with either me or the core library team. Thanks! |
| 10 // TODO(ajohnsen): Remove at the 11th of August 2013. | 10 // TODO(ajohnsen): Remove at the 11th of August 2013. |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } | 890 } |
| 891 } | 891 } |
| 892 return buffer.toString(); | 892 return buffer.toString(); |
| 893 } | 893 } |
| 894 | 894 |
| 895 static String toStringIterable(Iterable iterable, String leftDelimiter, | 895 static String toStringIterable(Iterable iterable, String leftDelimiter, |
| 896 String rightDelimiter) { | 896 String rightDelimiter) { |
| 897 for (int i = 0; i < _toStringList.length; i++) { | 897 for (int i = 0; i < _toStringList.length; i++) { |
| 898 if (identical(_toStringList[i], iterable)) { | 898 if (identical(_toStringList[i], iterable)) { |
| 899 return '$leftDelimiter...$rightDelimiter'; | 899 return '$leftDelimiter...$rightDelimiter'; |
| 900 } | 900 } |
| 901 } | 901 } |
| 902 | 902 |
| 903 StringBuffer result = new StringBuffer(); | 903 StringBuffer result = new StringBuffer(); |
| 904 try { | 904 try { |
| 905 _toStringList.add(iterable); | 905 _toStringList.add(iterable); |
| 906 result.write(leftDelimiter); | 906 result.write(leftDelimiter); |
| 907 result.writeAll(iterable, ', '); | 907 result.writeAll(iterable, ', '); |
| 908 result.write(rightDelimiter); | 908 result.write(rightDelimiter); |
| 909 } finally { | 909 } finally { |
| 910 assert(identical(_toStringList.last, iterable)); | 910 assert(identical(_toStringList.last, iterable)); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 | 1094 |
| 1095 static Set setDifference(Set set, Set other, Set result) { | 1095 static Set setDifference(Set set, Set other, Set result) { |
| 1096 for (var element in set) { | 1096 for (var element in set) { |
| 1097 if (!other.contains(element)) { | 1097 if (!other.contains(element)) { |
| 1098 result.add(element); | 1098 result.add(element); |
| 1099 } | 1099 } |
| 1100 } | 1100 } |
| 1101 return result; | 1101 return result; |
| 1102 } | 1102 } |
| 1103 } | 1103 } |
| OLD | NEW |