commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Pennebaker (JIRA)" <>
Subject [jira] [Created] (LANG-1023) WordUtils.wrap: Customizable breakable characters (not just space/whitespace)
Date Wed, 09 Jul 2014 15:24:04 GMT
Andrew Pennebaker created LANG-1023:

             Summary: WordUtils.wrap: Customizable breakable characters (not just space/whitespace)
                 Key: LANG-1023
             Project: Commons Lang
          Issue Type: Wish
          Components: lang.text.*
    Affects Versions: 3.3.2
            Reporter: Andrew Pennebaker

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]

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 = "/+-"]

This message was sent by Atlassian JIRA

View raw message