When I try this I get a crash on the last line:
let s = "😀" let range = s.startIndex..<s.endIndex let _ = ((s as NSString) as String)[range] // crashes
Is this expected to crash? And if so can someone tell me why or point me to an explanation? I'm trying to move to using Swift native ranges instead of NSRange and this crash really surprised me!