commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-671) Add indexOf() & lastIndexOf() methods for Whitespace and Non-whitespae to StringUtils
Date Thu, 13 Jan 2011 16:25:45 GMT

    [ 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.


Mime
View raw message