Marvellous - just what I was looking for - I look forward to this making into a release.
M On Thu, 2004-07-22 at 19:35, Stephen Colebourne wrote: > Try ordinalIndexOf() in the CVS. (I think thats what we called it...) > > Stephen > > ----- Original Message ----- > From: "Maxwell Grender-Jones" <[EMAIL PROTECTED]> > To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]> > Sent: Thursday, July 22, 2004 6:08 PM > Subject: [lang] String.xthIndexOf method > > > > I should like to add an xthIndexOf method to StringUtils that finds, for > > example, the 3rd space (or returns -1 if there are <3 spaces) in a > > string, and the corresponding lastxthIndexOf method. > > > > Firstly, if I was to code this up, would it be likely to be added? And > > secondly, what would we want the method name to be? > > > > Unfortunately indexOf(String str, String searchStr, int startPos) has > > already grabbed, in terms of doing indexOf(String str, String searchStr, > > int xthIndexOf) > > > > Should it thus be indexOf(String str, String searchStr, int startPos, > > int xthIndex)? Or alternatively leftIndexOf(String str, String > > searchStr, int xthIndex) (and corresponding lastIndexOf and > > rightIndexOf). > > > > Any feedback would be appreciated. > > > > Regards, > > > > Max > > -- > > Maxwell Grender-Jones <[EMAIL PROTECTED]> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Maxwell Grender-Jones <[EMAIL PROTECTED]> Technical support <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
