commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Commented: (LANG-510) Convert StringUtils API to take CharSequence
Date Sun, 07 Feb 2010 07:06:27 GMT


Henri Yandell commented on LANG-510:

Methods that could move to CharSequence if we had an indexOf:

ordinalIndexOf; though this requires a lastIndexOf(CharSequence also being added)
indexOfAny(String, String[])
lastIndexOfAny(String, String[]); with said method above being added
substringBefore/After etc
possible all the split code

Can be moved over already:

substring - with a slight slow down for the single int method as subSequence will force it
to calculate the length (not actually a calculation Harmony directly repeats)
many of the indexOfAny methods
left, right, mid

.... I got tired of listing things :) Still a lot that can move over without the indexOf change,
and even more that can with that change.

[In fact I'm cursing the lack of indexOf on CharSequence]

> Convert StringUtils API to take CharSequence
> --------------------------------------------
>                 Key: LANG-510
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Henri Yandell
>             Fix For: 3.0
>         Attachments: LANG-510-indexOf.patch
> Wherever possible, use CharSequence and not String in the StringUtils API.
> substring can go to subSequence inside code. The general substring method can be replaced
with a subSequence method and substring deprecated(?). One question is whether to implement
a CharSequence.indexOf type method. Given that it's merely a walking method(?!?), this might
be quite handy and would allow a bunch of StringUtils methods to move over.

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

View raw message