You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by marko-bekhta <gi...@git.apache.org> on 2016/07/27 04:24:35 UTC

[GitHub] commons-lang pull request #179: LANG-1023

GitHub user marko-bekhta opened a pull request:

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

    LANG-1023

    WordUtils.wrap: Customizable breakable characters (not just space/whitespace)
    
    changed wrap method to use regex pattern to find breakable characters rather than only spaces. added a few basic tests for "regex wrap"

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

    $ git pull https://github.com/marko-bekhta/commons-lang master

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

    https://github.com/apache/commons-lang/pull/179.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 #179
    
----
commit 0fe9685c8a78ba2d780a3ec1e1a323990dc6d218
Author: marko-bekhta <ma...@prykladna.lviv.ua>
Date:   2016-07-27T04:21:32Z

    LANG-1023
    WordUtils.wrap: Customizable breakable characters (not just space/whitespace)
    
    changed wrap method to use regex pattern to find breakable characters rather than only spaces. added a few basic tests for "regex 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.
---

[GitHub] commons-lang issue #179: LANG-1023

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/179
  
    
    [![Coverage Status](https://coveralls.io/builds/7973362/badge)](https://coveralls.io/builds/7973362)
    
    Coverage increased (+0.09%) to 93.527% when pulling **8c99b8299df8f5af5136e4ad53ea5111f953db92 on marko-bekhta:master** into **bd9adbb637a8a4aa5eb61c6fde2c576d0ab3c4fa on apache:master**.



---
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.
---

[GitHub] commons-lang issue #179: LANG-1023

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/179
  
    
    [![Coverage Status](https://coveralls.io/builds/7179085/badge)](https://coveralls.io/builds/7179085)
    
    Coverage decreased (-0.06%) to 93.386% when pulling **0fe9685c8a78ba2d780a3ec1e1a323990dc6d218 on marko-bekhta:master** into **bd9adbb637a8a4aa5eb61c6fde2c576d0ab3c4fa on apache:master**.



---
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.
---

[GitHub] commons-lang pull request #179: LANG-1023

Posted by marko-bekhta <gi...@git.apache.org>.
Github user marko-bekhta commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/179#discussion_r79809527
  
    --- Diff: src/main/java/org/apache/commons/lang3/text/WordUtils.java ---
    @@ -172,6 +173,84 @@ public static String wrap(final String str, final int wrapLength) {
          * @return a line with newlines inserted, <code>null</code> if null input
          */
         public static String wrap(final String str, int wrapLength, String newLineStr, final boolean wrapLongWords) {
    +        return wrap(str, wrapLength, newLineStr, wrapLongWords, " ");
    +    }
    +
    +    /**
    +     * <p>Wraps a single line of text, identifying words by <code>' '</code>.</p>
    +     *
    +     * <p>Leading spaces on a new line are stripped.
    +     * Trailing spaces are not stripped.</p>
    +     *
    +     * <table border="1" summary="Wrap Results">
    +     *  <tr>
    +     *   <th>input</th>
    +     *   <th>wrapLenght</th>
    +     *   <th>newLineString</th>
    +     *   <th>wrapLongWords</th>
    --- End diff --
    
    @britter Hi, I've made the requested changes. Can you take a look?


---
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.
---

[GitHub] commons-lang pull request #179: LANG-1023

Posted by britter <gi...@git.apache.org>.
Github user britter commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/179#discussion_r79648930
  
    --- Diff: src/main/java/org/apache/commons/lang3/text/WordUtils.java ---
    @@ -172,6 +173,84 @@ public static String wrap(final String str, final int wrapLength) {
          * @return a line with newlines inserted, <code>null</code> if null input
          */
         public static String wrap(final String str, int wrapLength, String newLineStr, final boolean wrapLongWords) {
    +        return wrap(str, wrapLength, newLineStr, wrapLongWords, " ");
    +    }
    +
    +    /**
    +     * <p>Wraps a single line of text, identifying words by <code>' '</code>.</p>
    --- End diff --
    
    Should be `identifying word by <code>wrapOn</code>`


---
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.
---

[GitHub] commons-lang pull request #179: LANG-1023

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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.
---

[GitHub] commons-lang pull request #179: LANG-1023

Posted by britter <gi...@git.apache.org>.
Github user britter commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/179#discussion_r79649084
  
    --- Diff: src/main/java/org/apache/commons/lang3/text/WordUtils.java ---
    @@ -172,6 +173,84 @@ public static String wrap(final String str, final int wrapLength) {
          * @return a line with newlines inserted, <code>null</code> if null input
          */
         public static String wrap(final String str, int wrapLength, String newLineStr, final boolean wrapLongWords) {
    +        return wrap(str, wrapLength, newLineStr, wrapLongWords, " ");
    +    }
    +
    +    /**
    +     * <p>Wraps a single line of text, identifying words by <code>' '</code>.</p>
    +     *
    +     * <p>Leading spaces on a new line are stripped.
    +     * Trailing spaces are not stripped.</p>
    +     *
    +     * <table border="1" summary="Wrap Results">
    +     *  <tr>
    +     *   <th>input</th>
    +     *   <th>wrapLenght</th>
    +     *   <th>newLineString</th>
    +     *   <th>wrapLongWords</th>
    --- End diff --
    
    The table is a column for the `wrapOn` parameter


---
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.
---

[GitHub] commons-lang issue #179: LANG-1023

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/commons-lang/pull/179
  
    
    [![Coverage Status](https://coveralls.io/builds/7973305/badge)](https://coveralls.io/builds/7973305)
    
    Coverage increased (+0.1%) to 93.565% when pulling **8c99b8299df8f5af5136e4ad53ea5111f953db92 on marko-bekhta:master** into **bd9adbb637a8a4aa5eb61c6fde2c576d0ab3c4fa on apache:master**.



---
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.
---