My old code was:
let comps = split(str, { $0 == \"-\" || $0 == \" \" }, maxSplit: Int.max, allowEmptySlices: false)
after update of Swift 2 my
The order of arguments for split() function messed up for some reason. It should be:
split()
let comps = split(str.characters, maxSplit: Int.max, allowEmptySlices: false) { $0 == "-" || $0 == " " }.map { String($0) }