commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang StringUtils.java
Date Wed, 24 Dec 2003 01:33:30 GMT
scolebourne    2003/12/23 17:33:30

  Modified:    lang/src/java/org/apache/commons/lang StringUtils.java
  Log:
  Fix mistake and clarify javadoc spec for replace
  
  Revision  Changes    Path
  1.122     +14 -10    jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java
  
  Index: StringUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- StringUtils.java	15 Dec 2003 01:51:36 -0000	1.121
  +++ StringUtils.java	24 Dec 2003 01:33:30 -0000	1.122
  @@ -2544,10 +2544,11 @@
        * <pre>
        * StringUtils.replaceOnce(null, *, *)        = null
        * StringUtils.replaceOnce("", *, *)          = ""
  -     * StringUtils.replaceOnce("aba", null, null) = "aba"
  -     * StringUtils.replaceOnce("aba", null, null) = "aba"
  +     * StringUtils.replaceOnce("any", null, *)    = "any"
  +     * StringUtils.replaceOnce("any", *, null)    = "any"
  +     * StringUtils.replaceOnce("any", "", *)      = "any"
        * StringUtils.replaceOnce("aba", "a", null)  = "aba"
  -     * StringUtils.replaceOnce("aba", "a", "")    = "aba"
  +     * StringUtils.replaceOnce("aba", "a", "")    = "ba"
        * StringUtils.replaceOnce("aba", "a", "z")   = "zba"
        * </pre>
        *
  @@ -2570,8 +2571,9 @@
        * <pre>
        * StringUtils.replace(null, *, *)        = null
        * StringUtils.replace("", *, *)          = ""
  -     * StringUtils.replace("aba", null, null) = "aba"
  -     * StringUtils.replace("aba", null, null) = "aba"
  +     * StringUtils.replace("any", null, *)    = "any"
  +     * StringUtils.replace("any", *, null)    = "any"
  +     * StringUtils.replace("any", "", *)      = "any"
        * StringUtils.replace("aba", "a", null)  = "aba"
        * StringUtils.replace("aba", "a", "")    = "b"
        * StringUtils.replace("aba", "a", "z")   = "zbz"
  @@ -2597,10 +2599,12 @@
        * <pre>
        * StringUtils.replace(null, *, *, *)         = null
        * StringUtils.replace("", *, *, *)           = ""
  -     * StringUtils.replace("abaa", null, null, 1) = "abaa"
  -     * StringUtils.replace("abaa", null, null, 1) = "abaa"
  -     * StringUtils.replace("abaa", "a", null, 1)  = "abaa"
  -     * StringUtils.replace("abaa", "a", "", 1)    = "abaa"
  +     * StringUtils.replace("any", null, *, *)     = "any"
  +     * StringUtils.replace("any", *, null, *)     = "any"
  +     * StringUtils.replace("any", "", *, *)       = "any"
  +     * StringUtils.replace("any", *, *, 0)        = "any"
  +     * StringUtils.replace("abaa", "a", null, -1) = "abaa"
  +     * StringUtils.replace("abaa", "a", "", -1)   = "b"
        * StringUtils.replace("abaa", "a", "z", 0)   = "abaa"
        * StringUtils.replace("abaa", "a", "z", 1)   = "zbaa"
        * StringUtils.replace("abaa", "a", "z", 2)   = "zbza"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message