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

Unified Diff: compiler/java/com/google/dart/compiler/util/StringUtils.java

Issue 10236009: Add the most useful Apache Commons utils (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add Dart copyright header Created 8 years, 8 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: compiler/java/com/google/dart/compiler/util/StringUtils.java
diff --git a/compiler/java/com/google/dart/compiler/util/StringUtils.java b/compiler/java/com/google/dart/compiler/util/StringUtils.java
deleted file mode 100644
index 91a1a0f7bf39402364c3c5a2f62eb4f7fb610ff4..0000000000000000000000000000000000000000
--- a/compiler/java/com/google/dart/compiler/util/StringUtils.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-package com.google.dart.compiler.util;
-
-/**
- * Utilities for {@link String}.
- */
-public class StringUtils {
- /**
- * The empty String <code>""</code>.
- */
- public static final String EMPTY = "";
-
- /**
- * @return the the substring before the first occurrence of a separator.
- */
- public static String substringBefore(String str, String separator) {
- int index = str.indexOf(separator);
- if (index == -1) {
- return str;
- }
- return str.substring(0, index);
- }
-
- /**
- * @return the substring after the first occurrence of a separator.
- */
- public static String substringAfter(String str, String separator) {
- int index = str.indexOf(separator);
- if (index == -1) {
- return EMPTY;
- }
- return str.substring(index + separator.length());
- }
-}

Powered by Google App Engine
This is Rietveld 408576698