commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <>
Subject [jira] [Resolved] (LANG-895) Improving StringUtils#substringAfterLast
Date Tue, 28 Apr 2015 19:01:06 GMT


Benedikt Ritter resolved LANG-895.
       Resolution: Won't Fix
    Fix Version/s:     (was: Discussion)
                       (was: Review Patch)

Thank you for the suggestion. As discussed, I'm closing this as won't fix.

> Improving StringUtils#substringAfterLast
> ----------------------------------------
>                 Key: LANG-895
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 3.1
>         Environment: any
>            Reporter: Ivan Hristov
>            Priority: Minor
>         Attachments: LANG-895.patch
> At the moment, we have the following method public static String substringAfterLast(String
str, String separator) in the class StringUtils which returns an empty string in case no separator
is present. I think, it would be handy to be able to control what is returned in case no separator
is found. For this reason, I would propose to have a method with the following signature:
> public static String substringAfterLast(String str, String separator, String defaultValue).
The same proposal holds for public static String substringAfter(String str, String separator).

This message was sent by Atlassian JIRA

View raw message