commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey-Khobnya <...@git.apache.org>
Subject [GitHub] commons-lang pull request: Fix bug with stripping spaces on last l...
Date Tue, 08 Apr 2014 12:18:55 GMT
GitHub user Andrey-Khobnya opened a pull request:

    https://github.com/apache/commons-lang/pull/18

    Fix bug with stripping spaces on last line in WordUtils.wrap()

    In _WordUtils.wpap()_ leading white spaces on new lines are stripped from the result.
But there is a bug if there are multiple white spaces on the last line. For example:
    ```java
    input = "word1             word2                        word3";
    System.out.println(WordUtils.wrap(input, 7));
    ```
    The result will
    ```
    word1  
    word2  
      word3
    ```
    Expected result is
    ```
    word1  
    word2  
    word3
    ```
    
    I propose fix contained in this pull request.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Andrey-Khobnya/commons-lang trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/18.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18
    
----
commit de232c50edb95d0b1a28ada28c7475abd346d419
Author: Andrey Khobnya <andrey@khobnya.me>
Date:   2014-04-08T12:15:31Z

    Fix bug with stripping spaces on last line in WordUtils.wrap()

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message