From 4f3b8025948e3dd2d6acf6dfecacac4597cae0e8 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Mon, 2 Mar 2009 02:33:24 +0000 Subject: [PATCH] Adding javadoc per LANG-424 to point out what happens in substringLast/substringBefore methods when substring is not found git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@749151 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/lang/StringUtils.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/java/org/apache/commons/lang/StringUtils.java b/src/java/org/apache/commons/lang/StringUtils.java index 4c7dccf92..eefbd1957 100644 --- a/src/java/org/apache/commons/lang/StringUtils.java +++ b/src/java/org/apache/commons/lang/StringUtils.java @@ -1755,6 +1755,8 @@ public class StringUtils { * An empty ("") string input will return the empty string. * A null separator will return the input string.

* + *

If nothing is found, the string input is returned.

+ * *
      * StringUtils.substringBefore(null, *)      = null
      * StringUtils.substringBefore("", *)        = ""
@@ -1795,6 +1797,8 @@ public class StringUtils {
      * A null separator will return the empty string if the
      * input string is not null.

* + *

If nothing is found, the empty string is returned.

+ * *
      * StringUtils.substringAfter(null, *)      = null
      * StringUtils.substringAfter("", *)        = ""
@@ -1834,6 +1838,8 @@ public class StringUtils {
      * An empty ("") string input will return the empty string.
      * An empty or null separator will return the input string.

* + *

If nothing is found, the string input is returned.

+ * *
      * StringUtils.substringBeforeLast(null, *)      = null
      * StringUtils.substringBeforeLast("", *)        = ""
@@ -1871,6 +1877,8 @@ public class StringUtils {
      * An empty or null separator will return the empty string if
      * the input string is not null.

* + *

If nothing is found, the empty string is returned.

+ * *
      * StringUtils.substringAfterLast(null, *)      = null
      * StringUtils.substringAfterLast("", *)        = ""