Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5A8A2200B90 for ; Sun, 25 Sep 2016 19:20:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5924F160AE6; Sun, 25 Sep 2016 17:20:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A71BA160ACE for ; Sun, 25 Sep 2016 19:20:28 +0200 (CEST) Received: (qmail 49989 invoked by uid 500); 25 Sep 2016 17:20:27 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 49883 invoked by uid 99); 25 Sep 2016 17:20:27 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Sep 2016 17:20:27 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 85F01E0A3F; Sun, 25 Sep 2016 17:20:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: britter@apache.org To: commits@commons.apache.org Date: Sun, 25 Sep 2016 17:20:28 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/6] [lang] LANG-1023 WordUtils.wrap: Customizable breakable characters (not just space/whitespace) archived-at: Sun, 25 Sep 2016 17:20:29 -0000 LANG-1023 WordUtils.wrap: Customizable breakable characters (not just space/whitespace) updated JavaDoc Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/78c373d7 Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/78c373d7 Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/78c373d7 Branch: refs/heads/master Commit: 78c373d7bc23e81c82cac6feb66a9f6b9472f8ab Parents: 0fe9685 Author: marko-bekhta Authored: Tue Sep 20 19:46:50 2016 +0200 Committer: marko-bekhta Committed: Tue Sep 20 19:46:50 2016 +0200 ---------------------------------------------------------------------- .../org/apache/commons/lang3/text/WordUtils.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-lang/blob/78c373d7/src/main/java/org/apache/commons/lang3/text/WordUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java b/src/main/java/org/apache/commons/lang3/text/WordUtils.java index 9e04962..a85f28f 100644 --- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java +++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java @@ -177,7 +177,7 @@ public class WordUtils { } /** - *

Wraps a single line of text, identifying words by ' '.

+ *

Wraps a single line of text, identifying words by wrapOn.

* *

Leading spaces on a new line are stripped. * Trailing spaces are not stripped.

@@ -188,6 +188,7 @@ public class WordUtils { * wrapLenght * newLineString * wrapLongWords + * wrapOn * result * * @@ -195,6 +196,7 @@ public class WordUtils { * * * * * true/false + * * * null * * @@ -202,6 +204,7 @@ public class WordUtils { * * * * * true/false + * * * "" * * @@ -209,6 +212,7 @@ public class WordUtils { * 20 * "\n" * true/false + * " " * "Here is one line of\ntext that is going\nto be wrapped after\n20 columns." * * @@ -216,6 +220,7 @@ public class WordUtils { * 20 * "<br />" * true/false + * " " * "Here is one line of<br />text that is going<br />to be wrapped after<br />20 columns." * * @@ -223,6 +228,7 @@ public class WordUtils { * 20 * null * true/false + * " " * "Here is one line of" + systemNewLine + "text that is going" + systemNewLine + "to be wrapped after" + systemNewLine + "20 columns." * * @@ -230,6 +236,7 @@ public class WordUtils { * 20 * "\n" * false + * " " * "Click here to jump\nto the commons\nwebsite -\nhttp://commons.apache.org" * * @@ -237,10 +244,18 @@ public class WordUtils { * 20 * "\n" * true + * " " * "Click here to jump\nto the commons\nwebsite -\nhttp://commons.apach\ne.org" * + * + * "flammable/inflammable" + * 20 + * "\n" + * true + * "/" + * "flammable/inflammable" + * * - * * @param str the String to be word wrapped, may be null * @param wrapLength the column to wrap the words at, less than 1 is treated as 1 * @param newLineStr the string to insert for a new line,