Let's say I want to split a string by an empty space. This code snippet works fine in Swift 1.x. It does not work in Swift 2 in Xcode 7 Beta 1.
var str = "Hello Bob"
var foo = split(str) {$0 == " "}
I get the following compiler error:
Cannot invoke 'split' with an argument list of type '(String, (_) -> _)
Anyone know how to call this correctly?
Updated: Added a note that this was for the Xcode 7 beta 1.