Index: sdk/lib/core/string.dart |
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart |
index bd3a15e40ee80c824c23218325887315d55e533c..ed352e4b03534cba92a2bad0c71a78a6f59b7106 100644 |
--- a/sdk/lib/core/string.dart |
+++ b/sdk/lib/core/string.dart |
@@ -111,7 +111,7 @@ abstract class String implements Comparable<String>, Pattern { |
* `0 <= start <= end <= charCodes.length`. |
*/ |
external factory String.fromCharCodes(Iterable<int> charCodes, |
- [int start = 0, int end]); |
+ [int start = 0, int end]); |
/** |
* Allocates a new String for the specified [charCode]. |
@@ -144,7 +144,7 @@ abstract class String implements Comparable<String>, Pattern { |
* var isDeclared = const String.fromEnvironment("maybeDeclared") != null; |
*/ |
external const factory String.fromEnvironment(String name, |
- {String defaultValue}); |
+ {String defaultValue}); |
/** |
* Gets the character (as a single-code-unit [String]) at the given [index]. |
@@ -436,7 +436,7 @@ abstract class String implements Comparable<String>, Pattern { |
* then return a string. |
*/ |
String replaceFirstMapped(Pattern from, String replace(Match match), |
- [int startIndex = 0]); |
+ [int startIndex = 0]); |
/** |
* Replaces all substrings that match [from] with [replace]. |
@@ -558,8 +558,7 @@ abstract class String implements Comparable<String>, Pattern { |
* onNonMatch: (n) => '*'); // *shoots* |
*/ |
String splitMapJoin(Pattern pattern, |
- {String onMatch(Match match), |
- String onNonMatch(String nonMatch)}); |
+ {String onMatch(Match match), String onNonMatch(String nonMatch)}); |
/** |
* Returns an unmodifiable list of the UTF-16 code units of this string. |
@@ -625,7 +624,6 @@ class Runes extends Iterable<int> { |
} |
return code; |
} |
- |
} |
// Is then code (a 16-bit unsigned integer) a UTF-16 lead surrogate. |
@@ -659,7 +657,9 @@ class RuneIterator implements BidirectionalIterator<int> { |
/** Create an iterator positioned at the beginning of the string. */ |
RuneIterator(String string) |
- : this.string = string, _position = 0, _nextPosition = 0; |
+ : this.string = string, |
+ _position = 0, |
+ _nextPosition = 0; |
/** |
* Create an iterator positioned before the [index]th code unit of the string. |
@@ -672,14 +672,17 @@ class RuneIterator implements BidirectionalIterator<int> { |
* The [index] position must not be in the middle of a surrogate pair. |
*/ |
RuneIterator.at(String string, int index) |
- : string = string, _position = index, _nextPosition = index { |
+ : string = string, |
+ _position = index, |
+ _nextPosition = index { |
RangeError.checkValueInInterval(index, 0, string.length); |
_checkSplitSurrogate(index); |
} |
/** Throw an error if the index is in the middle of a surrogate pair. */ |
void _checkSplitSurrogate(int index) { |
- if (index > 0 && index < string.length && |
+ if (index > 0 && |
+ index < string.length && |
_isLeadSurrogate(string.codeUnitAt(index - 1)) && |
_isTrailSurrogate(string.codeUnitAt(index))) { |
throw new ArgumentError('Index inside surrogate pair: $index'); |