You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2016/11/06 11:21:58 UTC
[jira] [Resolved] (LANG-1281) Javadoc of StringUtils.ordinalIndexOf
is contradictory.
[ https://issues.apache.org/jira/browse/LANG-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pascal Schumacher resolved LANG-1281.
-------------------------------------
Resolution: Fixed
Assignee: Pascal Schumacher
Fix Version/s: 3.6
Thanks for reporting.
> Javadoc of StringUtils.ordinalIndexOf is contradictory.
> -------------------------------------------------------
>
> Key: LANG-1281
> URL: https://issues.apache.org/jira/browse/LANG-1281
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.*
> Affects Versions: 3.5
> Reporter: Andreas Lundblad
> Assignee: Pascal Schumacher
> Priority: Minor
> Fix For: 3.6
>
>
> Javadoc of StringUtils.ordinalIndexOf states the following:
> "The code increments the starting index by one, rather than by the length of the match string, so matches may overlap."
> But then gives the following example:
> StringUtils.ordinalIndexOf("aabaabaa", "", 2) = 0
> which clearly indicates that it does *not* increment the starting index by one in case of the empty string.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)