String to NSString to String invalidates Range<String.Index>

See NSString Indices invalidated potentially after it has been bridged to String and manipulated

2 Likes