[
https://issues.apache.org/jira/browse/LANG-1160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15571472#comment-15571472
]
ASF GitHub Bot commented on LANG-1160:
--------------------------------------
GitHub user kinow opened a pull request:
https://github.com/apache/commons-lang/pull/195
LANG-1160 StringUtils.abbreviate() to support 'custom ellipses' parameter
From [LANG-1160](https://issues.apache.org/jira/browse/LANG-1160).
Before this pull request the code contained only two abbreviate methods.
One abbreviate(String, int) that would call the other one abbreviate(String,
int, int) with a default value for one of the int parameters.
This pull request adds two other methods with the same name, but that
receive a custom abbreviation marker. The existing methods were update to call
the new complete method with a default abbreviation marker of "...", which
guarantees backward compatibility (we are keeping binary compatibility, and
also feature backward compatibility).
Tests were update, test coverage is the same as before. No issues found
building the site locally and from looking at CPD, PMD, FindBugs, CheckStyle
and Surefire reports; all tests passing locally, with additional two tests in
this PR.
Cheers
Bruno
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kinow/commons-lang fix-LANG-1160
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/195.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 #195
----
commit a7b552208acb7d4eb6d79bddb60cb358ae1ce5bd
Author: Bruno P. Kinoshita <[email protected]>
Date: 2016-10-13T09:55:17Z
LANG-1160 StringUtils.abbreviate() to support 'custom ellipses' parameter
----
> StringUtils.abbreviate() to support "custom ellipses" parameter
> ---------------------------------------------------------------
>
> Key: LANG-1160
> URL: https://issues.apache.org/jira/browse/LANG-1160
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.4
> Reporter: Hendy Irawan
> Priority: Trivial
>
> {{abbreviateMiddle()}} supports custom replacement string.
> {{abbreviate()}} needs to also support this, for example to to use "…"
> Unicode character instead of three "..."
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)