Closed tomcheung closed 5 years ago
Thank you for your fix! Did you compare the performance of this approach to the previous one?
Here is the unit test report execute in my machine (iMac 5k 2017, Core i7 16 GB Ram, Xcode 10.2.1, Swift 5)
Seem this approach is surprisingly faster (compare result on testLargeUnescapingPerformance)
Previous
Current
Awesome! Thanks so much again. Will go into the next release 🚢
Refer to #22, use
String.range
to search&
character with cause fatal error if that string is converted fromNSString
This PR is going to fix this issue by using
Substring
andString.index
to perform character searching, instead of usingString.range