[SR-8416] Fatal error: cannot increment beyond endIndex on String.distance when specific unicode characters are present #50941
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Attachment: Download
Environment
High Sierra 10.13.5
Macbook Pro 15-inch, 2017, 2.9Ghz intel Core i7, 16GB
XCode 9.4.1 (9F2000)
Swift 4
Additional Detail from JIRA
md5: cdfbee80384d05d90e87af13186bb96b
Issue Description:
Trying to get the distance between indices of a string where the index is on specific unicode character causes the throw of a Fatal Error: cannot increment beyond endIndex.
The characters I was able to reproduce this issue are (without the quotes):
" ͡" or "͜"
Attached a playground with reproducible example, but this is the code:
The text was updated successfully, but these errors were encountered: