I stumbled across that when I used NSLOG to print a string of URLs, I got an EXC_BAD_ACCESS crash. Then I know that if the string contains a percent sign %, I need to write
NSLog("%@", urlStr)
to avoid it truns into something weird. But I am really curious why such a string will cause such an effect . So I removed all characters that didn't cause a crash, by this far I was left with this string“
NSLog("%3A%2F%2F%2F%2F%2F%3F%3D%2k%3D%2s%3D")
So the question is: Why nslog this string will cause a crush, what happened? I decoded this string and the result is
://///?=%2k=%2s=
that does't explain at all. What I used is Swift by the way, does it matters?