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

Unified Diff: pkg/analyzer/lib/src/generated/java_core.dart

Issue 2317113005: Remove StringUtils from java_core. (Closed)
Patch Set: Created 4 years, 3 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
Index: pkg/analyzer/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index bedb35fc62369656bbc9801d8eec42146621f8cc..81f9c00021d6a5222202ae21ef5a8432e43c1680 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -293,78 +293,6 @@ class StringIndexOutOfBoundsException extends JavaException {
StringIndexOutOfBoundsException(int index) : super('$index');
}
-class StringUtils {
- static String capitalize(String str) {
- if (isEmpty(str)) {
- return str;
- }
- return str.substring(0, 1).toUpperCase() + str.substring(1);
- }
-
- static bool equals(String cs1, String cs2) {
- if (cs1 == cs2) {
- return true;
- }
- if (cs1 == null || cs2 == null) {
- return false;
- }
- return cs1 == cs2;
- }
-
- static bool isEmpty(String str) {
- return str == null || str.isEmpty;
- }
-
- static String join(Iterable iter,
- [String separator = ' ', int start = 0, int end = -1]) {
- if (start != 0) {
- iter = iter.skip(start);
- }
- if (end != -1) {
- iter = iter.take(end - start);
- }
- return iter.join(separator);
- }
-
- static void printf(StringBuffer buffer, String fmt, List args) {
- buffer.write(_printf(fmt, args));
- }
-
- static String remove(String str, String remove) {
- if (isEmpty(str) || isEmpty(remove)) {
- return str;
- }
- return str.replaceAll(remove, '');
- }
-
- static String removeStart(String str, String remove) {
- if (isEmpty(str) || isEmpty(remove)) {
- return str;
- }
- if (str.startsWith(remove)) {
- return str.substring(remove.length);
- }
- return str;
- }
-
- static String repeat(String s, int n) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < n; i++) {
- sb.write(s);
- }
- return sb.toString();
- }
-
- static List<String> split(String s, [String pattern = ' ']) {
- return s.split(pattern);
- }
-
- static List<String> splitByWholeSeparatorPreserveAllTokens(
- String s, String pattern) {
- return s.split(pattern);
- }
-}
-
class UnsupportedOperationException extends JavaException {
UnsupportedOperationException([message = ""]) : super(message);
}
« no previous file with comments | « pkg/analysis_server/lib/src/services/refactoring/extract_method.dart ('k') | pkg/analyzer/test/generated/test_support.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698