Return-Path: Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 78114 invoked from network); 26 Aug 2003 00:48:01 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 26 Aug 2003 00:48:01 -0000 Received: (qmail 12616 invoked by uid 50); 25 Aug 2003 23:50:24 -0000 Date: 25 Aug 2003 23:50:24 -0000 Message-ID: <20030825235024.12615.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 22719] New: - [lang][patch] Add StringUtils.nIndexOf? X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22719 [lang][patch] Add StringUtils.nIndexOf? Summary: [lang][patch] Add StringUtils.nIndexOf? Product: Commons Version: 2.0 Milestone 1 Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Lang AssignedTo: commons-dev@jakarta.apache.org ReportedBy: ggregory@seagullsw.com We have indexOf(String, String), lastIndexOf(String, String) but no method to pick of a specific n-th occurrence (I need the 2nd one for example). So I propose to add (post 2.0): nIndexOf(String, String, int). I am not in love with the method name, but what else to call it? It does fit in the pattern IndexOf() that the other methods have, where indexOf() is really firstIndexOf(). Alternatives?: nThIndexOf(String, String, int) - kinda weird countIndexOf(String, String, int) - weirder indexOfOccurrence(String, String, int) - a bit wordy but ok. indexOfAt(String, String, int) - short; confusing? indexOfStringAt(String, String, int) - we got rid of "String" in a bunch of method names already, odd to reintroduce?