[ 
https://issues.apache.org/jira/browse/LANG-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791230#action_12791230
 ] 

Henri Yandell commented on LANG-469:
------------------------------------

Just noticed that indexOfNth is already there as 'ordinalIndexOf'. 

I think head and tail are simple enough that they can be relegated to the 
javadoc as more in depth examples.

Definitely needs to be a lastOrdinalIndexOf method. Must admit that I don't 
find that the most natural name.

> Commons-lang StringUtils head, tail and indexOfNth (with patch)
> ---------------------------------------------------------------
>
>                 Key: LANG-469
>                 URL: https://issues.apache.org/jira/browse/LANG-469
>             Project: Commons Lang
>          Issue Type: Improvement
>            Reporter: Kalecser Pasquali Kurtz
>            Priority: Minor
>             Fix For: 3.0
>
>         Attachments: StringUtils_head_tail_indexofnth.diff
>
>
> Hello commons developers,
> I would like to propose the addition of these four methods to StringUtils 
> class:
> public static String head(final String str, int lines)
> public static String tail(String str, int lines)
> public static int indexOfNth(String str, String searchStr, int occurrence)
> public static int lastIndexOfNth(String str, String searchStr, int occurrence)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to