Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A3B8174C1 for ; Tue, 28 Apr 2015 19:01:07 +0000 (UTC) Received: (qmail 1218 invoked by uid 500); 28 Apr 2015 19:01:06 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 1114 invoked by uid 500); 28 Apr 2015 19:01:06 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 1093 invoked by uid 99); 28 Apr 2015 19:01:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 19:01:06 +0000 Date: Tue, 28 Apr 2015 19:01:06 +0000 (UTC) From: "Benedikt Ritter (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (LANG-895) Improving StringUtils#substringAfterLast MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] 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: https://issues.apache.org/jira/browse/LANG-895 > 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 (v6.3.4#6332)