I have a long string (sometimes over 1000 characters) that I want to convert to an array of boolean values. And it needs to do this many times, very quickly.
let
Use withCString(_:) to retrieve a raw UnsafePointer. Iterate over that and compare to 49 (ascii value of "1").
withCString(_:)
UnsafePointer
"1"