commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [lang] StringUtils.ordinalIndexOf() and INDEX_NOT_FOUND
Date Thu, 04 Sep 2003 23:22:15 GMT
Personally I wouldn't use INDEX_NOT_FOUND, as -1 is so well known.

Stephen

----- Original Message -----
From: "Gary Gregory" <ggregory@seagullsw.com>
To: "'Jakarta Commons Developers List'" <commons-dev@jakarta.apache.org>
Sent: Thursday, September 04, 2003 7:22 PM
Subject: [lang] StringUtils.ordinalIndexOf() and INDEX_NOT_FOUND


> Hello All,
>
> I've added StringUtils.ordinalIndexOf() and introduced a new constant
> StringUtils.INDEX_NOT_FOUND = -1. Currently, only ordinalIndexOf uses this
> constant.
>
> I would like to get a fell if folks think that replacing (where
> appropriate), the -1 magic number usage in StringUtils with this constant
is
> a good idea or refactoring gone wild.
>
> Thanks,
> Gary
>


Mime
View raw message