Skip to content

IntlPartsIterator key is wrong for KEY_LEFT/KEY_RIGHT #7734

Closed
@TRowbotham

Description

@TRowbotham

Description

When creating an IntlPartsIterator with a type of IntlPartsIterator::KEY_LEFT or IntlPartsIterator::KEY_RIGHT, the returned key value is off by one after the first key. So for the string "ABC" you would get 0, 2, 3, instead of the expected 0, 1, 2.

https://3v4l.org/O8374
https://3v4l.org/SNUAX

Originally filed as https://bugs.php.net/bug.php?id=78308
Initial fix attempt #4446

PHP Version

8.1.0

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions