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

Unified Diff: pkg/analysis_server/lib/src/services/correction/strings.dart

Issue 1628623002: Isse 25404. When remove a method during inlining, remove also leading empty lines. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/strings.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/strings.dart b/pkg/analysis_server/lib/src/services/correction/strings.dart
index 1689c7c5727e95c537ada39923431340529f342e..4a0ff769a967ab8224fae5df9343d48600153f0e 100644
--- a/pkg/analysis_server/lib/src/services/correction/strings.dart
+++ b/pkg/analysis_server/lib/src/services/correction/strings.dart
@@ -201,6 +201,10 @@ bool isEmpty(String str) {
return str == null || str.isEmpty;
}
+bool isEOL(int c) {
+ return c == 0x0D || c == 0x0A;
+}
+
bool isLetter(int c) {
return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);
}
@@ -220,7 +224,7 @@ bool isUpperCase(int c) {
}
bool isWhitespace(int c) {
- return isSpace(c) || c == 0x0D || c == 0x0A;
+ return isSpace(c) || isEOL(c);
}
String remove(String str, String remove) {
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698