You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2011/01/13 17:25:45 UTC
[jira] Commented: (LANG-671) Add indexOf() & lastIndexOf() methods
for Whitespace and Non-whitespae to StringUtils
[ https://issues.apache.org/jira/browse/LANG-671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981315#action_12981315 ]
Henri Yandell commented on LANG-671:
------------------------------------
I wonder if a utility around indexOfUsingRegexp would be more powerful? Ideally you wouldn't hand roll this code but use "\s" and "\S".
> Add indexOf() & lastIndexOf() methods for Whitespace and Non-whitespae to StringUtils
> -------------------------------------------------------------------------------------
>
> Key: LANG-671
> URL: https://issues.apache.org/jira/browse/LANG-671
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.*
> Reporter: Niall Pemberton
> Attachments: LANG-671-StringUtils-whitespace.patch
>
>
> Whitespace methods:
> {code}
> public static int indexOfWhitespace(CharSequence str, int startPos)
> public static int lastIndexOfWhitespace(CharSequence str, int startPos)
> {code}
> Non-whitespace methods:
> {code}
> public static int indexOfNonWhitespace(CharSequence str, int startPos)
> public static int lastIndexOfNonWhitespace(CharSequence str, int startPos)
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.