Github user MarkDacek commented on the issue:
https://github.com/apache/commons-lang/pull/251
@chtompki Please look this over. We have some interesting conflicts here.
1. The issue mentioned above. indexOf("a") will double-count
surrogate-pairs if they exist. We can fix this if need be.
2. A string with two surrogate-pairs will read as length 4, though we will
treat it as length 2 for the purpose of these operations. E.G. :
```
final int CODE_POINT = 0x2070E;
StringBuilder builder = new StringBuilder();
builder.appendCodePoint(CODE_POINT);
builder.appendCodePoint(CODE_POINT);
StringUtils.lastIndexOf(builder, CODE_POINT, 2)
```
the bottom line will return -1, wheras the builder.toString()... version
returns 2. I suspect this is just that they disregarded our issue and start at
charAt(2) instead of our iterative approach here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---