[SR-13567] po String.Index
should print something human readable in lldb
#4459
Labels
po String.Index
should print something human readable in lldb
#4459
Environment
Xcode 11.6
Additional Detail from JIRA
md5: 4d30133c5fc61e9a0c3490e66212c606
Issue Description:
If you `po` or `p` a String.Index today, you get something like "_rawBits : 131072". This is very annoying when debugging code that manipulates strings. I think simply printing the `position` from those raw bits would be enough; ideally both the code-unit offset and the grapheme position, if those are available to String.Index.
I realize that I can use `encodedOffset` today to get the UTF-16 code unit offset, but that isn't ideal for non-ascii cases, or for when I'm printing the data type containing them, like Range<String.Index>.
The text was updated successfully, but these errors were encountered: