commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LANG-1023) Add WordUtils.wrap overload with customizable breakable character
Date Sun, 25 Sep 2016 17:21:20 GMT

     [ https://issues.apache.org/jira/browse/LANG-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benedikt Ritter resolved LANG-1023.
-----------------------------------
       Resolution: Fixed
         Assignee: Benedikt Ritter
    Fix Version/s:     (was: Review Patch)
                   3.5

> Add WordUtils.wrap overload with customizable breakable character
> -----------------------------------------------------------------
>
>                 Key: LANG-1023
>                 URL: https://issues.apache.org/jira/browse/LANG-1023
>             Project: Commons Lang
>          Issue Type: Wish
>          Components: lang.text.*
>    Affects Versions: 3.3.2
>            Reporter: Andrew Pennebaker
>            Assignee: Benedikt Ritter
>              Labels: word,wrap,word-wrap,
>             Fix For: 3.5
>
>
> WordUtils.wrap is good at what it does, but I want slightly different semantics. I would
like the option to set different characters for word breaking, not just space or whitespace,
but punctuation marks.
> The current implementation wraps like this:
> flammable/inflammable [original string]
> flammable/inflammable [wrap with large widths]
> flammable/inflammable [wrap with wrapLongWords = false]
> flammable/inflam           [wrap with wrapLongWords = true]
> mable
> I would like to configure wrap to break "flammable/inflammable" on punctuation marks
as well as whitespace, so that it wraps like this:
> flammable/                     [wrap with additionalBreakCharacters = "/+-"]
> inflammable



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message